Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ABEMAのRenderScript Intrinsics Replacement Toolk...

ABEMAのRenderScript Intrinsics Replacement Toolkit 導入事例

Go Takahana

May 29, 2023
Tweet

More Decks by Go Takahana

Other Decks in Technology

Transcript

  1. ΅͔͠ը૾࡞੒ํ๏ͷݕ౼ ํ๏ ϝϦοτ ݒ೦ ը૾ϩʔμʔͷ 
 #MVS5SBOTGPSNBUJPO (MJEFͱ$PJMΛར༻͍ͯ͠Δ 
 ͷͰಋೖ͕؆୯

    3FOEFS4DSJQUΛར༻͍ͯ͠Δ ˞$PJMͰ͸Ͱ࡟আࡁΈ αʔυύʔςΟͷ 
 ը૾Ճ޻ϥΠϒϥϦ ಋೖ͕؆୯ 3FOEFS4DSJQUΛར༻͍ͯ͠Δ ϝϯςͮ͠Β͍ $PNQPTFͷ.PEJ fi FSCMVS ͙͢࢖͑Δ "OESPJEҎ্Ͱ͔͠࢖͑ͳ͍ ※ϝϦοτ΍σϝϦοτ͸ABEMAΞϓϦʹ͓͚Δ΋ͷͰɺଞΞϓϦʹ͓͍ͯ͸ҟͳΔ৔߹͕͋Γ·͢ɻ
  2. Coil BlurTransformation ΋࡟আࡁΈ • 2.0.0Ͱ࡟আࡁΈ • ཧ༝͸ɺRenderScript ͷαϙʔτऴ͔ྃͨ͠ΒͩͱࢥΘΕΔ ৄࡉ͸Θ͔Βͳ͔͕ͬͨɺDiscussion ͷ಺༰Λࢀߟʹ͍ͯ͠Δ

    • Ҿ͖ଓ͖ར༻͍ͨ͠ͳΒɺݩͷίʔυΛίϐʔ͢ΔΑ͏ʹҊ಺͕ग़͍ͯΔ https://coil-kt.github.io/coil/changelog/#200-may-10-2022 https://github.com/coil-kt/coil/discussions/1362
  3. Modi fi er.blur ͸ Android 12 Ҏ্Ͱར༻Մೳ • RenderEffect Λར༻͍ͯ͠Δ

    RenderEffect ͸ Android 12 Ҏ্Ͱར༻Մೳ @Stable fun Modifier.blur( radiusX: Dp, radiusY: Dp, edgeTreatment: BlurredEdgeTreatment = BlurredEdgeTreatment.Rectangle, ): Modifier { ... graphicsLayer { this.renderEffect = // Only non-zero blur radii are valid BlurEffect parameters if (horizontalBlurPixels > 0f && verticalBlurPixels > 0f) { BlurEffect(horizontalBlurPixels, verticalBlurPixels, tileMode) } else { null }
  4. ΅͔͠ը૾࡞੒ํ๏ͷݕ౼ʢ࠶ܝʣ ํ๏ ϝϦοτ ݒ೦ ը૾ϩʔμʔͷ 
 #MVS5SBOTGPSNBUJPO (MJEFͱ$PJMΛར༻͍ͯ͠Δ 
 ͷͰಋೖ͕؆୯

    3FOEFS4DSJQUΛར༻͍ͯ͠Δ ˞$PJMͰ͸Ͱ࡟আࡁΈ αʔυύʔςΟͷ 
 ը૾Ճ޻ϥΠϒϥϦ ಋೖ͕؆୯ 3FOEFS4DSJQUΛར༻͍ͯ͠Δ ϝϯςͮ͠Β͍ $PNQPTFͷ.PEJ fi FSCMVS ͙͢࢖͑Δ "OESPJEҎ্Ͱ͔͠࢖͑ͳ͍ ※ϝϦοτ΍σϝϦοτ͸ABEMAΞϓϦʹ͓͚Δ΋ͷͰɺଞΞϓϦʹ͓͍ͯ͸ҟͳΔ৔߹͕͋Γ·͢ɻ ❌ ❌ ❌
  5. ߟྀ͢΂͖఺ • αϙʔτόʔδϣϯ ΞϓϦ͸ API 21 (Android 5.0) Ҏ্Λαϙʔτ •

    ύϑΥʔϚϯε͕ѱ͘ͳΒͳ͍͔ جຊతʹը૾ॲཧ͸ॏ͍ͨ
  6. ݕ౼ͨ͠બ୒ࢶ ํ๏ αϙʔτ7FS ಋೖͷ͠΍͢͞ ύϑΥʔϚϯε උߟ 3FOEFS& ff FDU ˚

    ˓ ʁ 3FOEFS4DSJQU*OUSJOTJDT 3FQMBDFNFOU5PPMLJU ˓ ˚ ˕ 3FOEFS4DSJQUͷ୅ସπʔϧɻ 3FOEFS4DSJQUͷഒͷ 
 ύϑΥʔϚϯε͕ݟࠐΊΔɻ˞ ࣗલͰը૾ॲཧ ˓ ˓ ˚ ˞IUUQTEFWFMPQFSBOESPJEDPNHVJEFUPQJDTSFOEFSTDSJQUNJHSBUF IMKBTDSJQUT ΋͠RenderScriptͷύϑΥʔϚϯε͕ྑ͚Ε͹ɺ Android 12 Ҏ্Ͱ͸RenderEffectɺͦΕະຬͰ͸ Toolkit Λར༻͢Ε͹ྑ͍͔΋͠Εͳ͍ɻ
  7. ܭଌ݁Ռ (Pixel 7) • P50 ~ P99 .. ύʔηϯλΠϧɻσʔλΛখ͍͞ॱʹฒ΂ͯɺॳΊ͔Β਺͑ͯԿ%·Ͱ͔ɻ •

    frameDurationCpsMs … ϑϨʔϜͷੜ੒ʹ͔͔ͬͨ࣌ؒ • (60fps) 16.67ms Ҏ্ͳΒ੺৭ɺ(90fps) 11.11ms Ҏ্ͳΒԫ৭ • frameOverrunMs … ʢਖ਼ͷ஋ʣͲΕ͘Β͍ϑϨʔϜੜ੒͕஗Ε͔ͨɺʢෛͷ஋ʣͲΕ͚ͩϑϨʔϜੜ੒͕ૣ͔͔ͬͨ • ෛͷ஋ͳΒ੨৭ • ࢼߦճ਺ 20ճ
  8. ·ͱΊ • RenderScript ͸αϙʔτ͕ऴ͍ྃͯ͠Δ • ͦͷ୅ସͱͯ͠ɺRenderScript Intrinsics Replacement Toolkit ͕͋Δ

    • ࠓճͷௐࠪͰ͸ɺAndroidView × Toolkit ͕ϑϨʔϜམ͕ͪগͳ͔ͬͨ ABEMAͷAndroidΞϓϦͰ Toolkit Λ࠾༻