Slide 1

Slide 1 text

ABEMAͷRenderScript Intrinsics Replacement Toolkit ಋೖࣄྫ גࣜձࣾAbemaTV ߴඓ ڷ

Slide 2

Slide 2 text

ߴඓ ڷ Takahana Go • 21৽ଔͰαΠόʔΤʔδΣϯτʹೖࣾ • ABEMAͷAndroidϞόΠϧ / TVΞϓϦͷ։ൃ @go_takahana

Slide 3

Slide 3 text

1. ώʔϩʔΤϦΞͷ౰ॳͷ࣮ݱํ๏ 2. ΅͔͠ը૾࡞੒ํ๏ͷબ୒ 3. ·ͱΊ

Slide 4

Slide 4 text

ώʔϩʔΤϦΞͷ
 ౰ॳͷ࣮ݱํ๏

Slide 5

Slide 5 text

ϗʔϜͷώʔϩʔΤϦΞ • ABEMAͷࠓͷΠνΦγ࡞඼Λ঺հ͢Δ • αϜωΠϧͷഎܠ͸΅͔ͨ͠αϜωΠϧ ※ϑϦʔը૾ʹࠩ͠ସ͍͑ͯ·͢

Slide 6

Slide 6 text

αϜωΠϧΛҾཱ͖ͯΔ ※ϑϦʔը૾ʹࠩ͠ସ͍͑ͯ·͢

Slide 7

Slide 7 text

ΫϥΠΞϯτͰ΅͔͠ը૾Λ࡞੒͢Δ αʔόʔ ΫϥΠΞϯτ • λΠτϧ • ը૾URL

Slide 8

Slide 8 text

΅͔͠ը૾࡞੒ํ๏ͷݕ౼ ํ๏ ϝϦοτ ݒ೦ ը૾ϩʔμʔͷ 
 #MVS5SBOTGPSNBUJPO (MJEFͱ$PJMΛར༻͍ͯ͠Δ 
 ͷͰಋೖ͕؆୯ 3FOEFS4DSJQUΛར༻͍ͯ͠Δ ˞$PJMͰ͸Ͱ࡟আࡁΈ αʔυύʔςΟͷ 
 ը૾Ճ޻ϥΠϒϥϦ ಋೖ͕؆୯ 3FOEFS4DSJQUΛར༻͍ͯ͠Δ ϝϯςͮ͠Β͍ $PNQPTFͷ.PEJ fi FSCMVS ͙͢࢖͑Δ "OESPJEҎ্Ͱ͔͠࢖͑ͳ͍ ※ϝϦοτ΍σϝϦοτ͸ABEMAΞϓϦʹ͓͚Δ΋ͷͰɺଞΞϓϦʹ͓͍ͯ͸ҟͳΔ৔߹͕͋Γ·͢ɻ

Slide 9

Slide 9 text

RenderScript ͷαϙʔτऴྃ https://developer.android.com/guide/topics/renderscript/compute?hl=ja

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

Modi fi er.blur ͸ Android 12 Ҏ্Ͱར༻Մೳ https://developer.android.com/reference/kotlin/androidx/compose/ui/ Modifier#(androidx.compose.ui.Modifier).blur(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.draw.BlurredEdgeTreatment)

Slide 12

Slide 12 text

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 }

Slide 13

Slide 13 text

΅͔͠ը૾࡞੒ํ๏ͷݕ౼ʢ࠶ܝʣ ํ๏ ϝϦοτ ݒ೦ ը૾ϩʔμʔͷ 
 #MVS5SBOTGPSNBUJPO (MJEFͱ$PJMΛར༻͍ͯ͠Δ 
 ͷͰಋೖ͕؆୯ 3FOEFS4DSJQUΛར༻͍ͯ͠Δ ˞$PJMͰ͸Ͱ࡟আࡁΈ αʔυύʔςΟͷ 
 ը૾Ճ޻ϥΠϒϥϦ ಋೖ͕؆୯ 3FOEFS4DSJQUΛར༻͍ͯ͠Δ ϝϯςͮ͠Β͍ $PNQPTFͷ.PEJ fi FSCMVS ͙͢࢖͑Δ "OESPJEҎ্Ͱ͔͠࢖͑ͳ͍ ※ϝϦοτ΍σϝϦοτ͸ABEMAΞϓϦʹ͓͚Δ΋ͷͰɺଞΞϓϦʹ͓͍ͯ͸ҟͳΔ৔߹͕͋Γ·͢ɻ ❌ ❌ ❌

Slide 14

Slide 14 text

ࣗલͰ࣮૷͠Α͏💪

Slide 15

Slide 15 text

΅͔͠ը૾࡞੒ํ๏ͷબ୒

Slide 16

Slide 16 text

ߟྀ͢΂͖఺ • αϙʔτόʔδϣϯ ΞϓϦ͸ API 21 (Android 5.0) Ҏ্Λαϙʔτ • ύϑΥʔϚϯε͕ѱ͘ͳΒͳ͍͔ جຊతʹը૾ॲཧ͸ॏ͍ͨ

Slide 17

Slide 17 text

ݕ౼ͨ͠બ୒ࢶ ํ๏ αϙʔτ7FS ಋೖͷ͠΍͢͞ ύϑΥʔϚϯε උߟ 3FOEFS& ff FDU ˚ ˓ ʁ 3FOEFS4DSJQU*OUSJOTJDT 3FQMBDFNFOU5PPMLJU ˓ ˚ ˕ 3FOEFS4DSJQUͷ୅ସπʔϧɻ 3FOEFS4DSJQUͷഒͷ 
 ύϑΥʔϚϯε͕ݟࠐΊΔɻ˞ ࣗલͰը૾ॲཧ ˓ ˓ ˚ ˞IUUQTEFWFMPQFSBOESPJEDPNHVJEFUPQJDTSFOEFSTDSJQUNJHSBUF IMKBTDSJQUT ΋͠RenderScriptͷύϑΥʔϚϯε͕ྑ͚Ε͹ɺ Android 12 Ҏ্Ͱ͸RenderEffectɺͦΕະຬͰ͸ Toolkit Λར༻͢Ε͹ྑ͍͔΋͠Εͳ͍ɻ

Slide 18

Slide 18 text

Macrobenchmark ͰύϑΥʔϚϯεܭଌ • FrameTimingMetrics Λར༻ ϑϨʔϜੜ੒ʹ͔͔͕ͬͨ࣌ؒΘ͔Δ • ςετΞϓϦͰ΅͔͠ը૾͕දࣔ͞ΕΔ·Ͱͷ ظؒΛܭଌ

Slide 19

Slide 19 text

ܭଌ݁Ռ (Pixel 7) • P50 ~ P99 .. ύʔηϯλΠϧɻσʔλΛখ͍͞ॱʹฒ΂ͯɺॳΊ͔Β਺͑ͯԿ%·Ͱ͔ɻ • frameDurationCpsMs … ϑϨʔϜͷੜ੒ʹ͔͔ͬͨ࣌ؒ • (60fps) 16.67ms Ҏ্ͳΒ੺৭ɺ(90fps) 11.11ms Ҏ্ͳΒԫ৭ • frameOverrunMs … ʢਖ਼ͷ஋ʣͲΕ͘Β͍ϑϨʔϜੜ੒͕஗Ε͔ͨɺʢෛͷ஋ʣͲΕ͚ͩϑϨʔϜੜ੒͕ૣ͔͔ͬͨ • ෛͷ஋ͳΒ੨৭ • ࢼߦճ਺ 20ճ

Slide 20

Slide 20 text

AndroidViewͷํ͕ϑϨʔϜੜ੒͕ૣ͍܏޲͋Γ • ಉ͘͡ RenderEffect Λ࢖͍ͬͯͯ΋ɺAndroidViewͷํ͕ૣ͍܏޲͋Γ • AndroidViewʹ͓͍ͯ͸ɺRenderEffect ͩͱ60fpsͰϑϨʔϜམͪ͢Δέʔ ε͕͋ͬͨ ※ࢲ෺ͷ Pixel 7 ʹ͓͍ͯ

Slide 21

Slide 21 text

AndroidView × Toolkit Λબ୒ • ࠓճͷௐࠪͰ͸ɺ࠷΋ϑϨʔϜམ͕ͪগͳ͔ͬͨͨΊɻ

Slide 22

Slide 22 text

·ͱΊ

Slide 23

Slide 23 text

·ͱΊ • RenderScript ͸αϙʔτ͕ऴ͍ྃͯ͠Δ • ͦͷ୅ସͱͯ͠ɺRenderScript Intrinsics Replacement Toolkit ͕͋Δ • ࠓճͷௐࠪͰ͸ɺAndroidView × Toolkit ͕ϑϨʔϜམ͕ͪগͳ͔ͬͨ ABEMAͷAndroidΞϓϦͰ Toolkit Λ࠾༻

Slide 24

Slide 24 text

͋Γ͕ͱ͏͍͟͝·ͨ͠