From 70276915db0c4ec604213c61cb69d8f0419e0e60 Mon Sep 17 00:00:00 2001 From: Jim Van Verth Date: Fri, 1 Jun 2018 13:46:46 -0400 Subject: Set bounds correctly for color emoji that need post-cache transfoms We need to handle the bounds for transformed color emoji the same way we handle the bounds for distance field text. Without this bounds correction, the glyphs were being clipped out. Also adds a sample to test this case. Bug: 848616 Change-Id: I39dedbe2fd19331ad67978c95519f5c9d46f59fc Reviewed-on: https://skia-review.googlesource.com/131523 Reviewed-by: Brian Salomon Commit-Queue: Brian Salomon Auto-Submit: Jim Van Verth --- gm/3dgm.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gm/3dgm.cpp') diff --git a/gm/3dgm.cpp b/gm/3dgm.cpp index 93c6f92281..8014c246d3 100644 --- a/gm/3dgm.cpp +++ b/gm/3dgm.cpp @@ -173,6 +173,9 @@ protected: SkString onShortName() override { return SkString("3dgm"); } bool onAnimate(const SkAnimTimer& timer) override { + if (!fAnim) { + return false; + } SkScalar dur = fAnim->duration(); fAnimT = fmod(timer.secs(), dur) / dur; return true; -- cgit v1.2.3