Add setBounds to SkLiteDL for Android
authorliyuqian <liyuqian@google.com>
Wed, 21 Sep 2016 14:11:08 +0000 (07:11 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 21 Sep 2016 14:11:08 +0000 (07:11 -0700)
The RootRenderNode in Android is changing bounds dynamically. This is a
temporary fix to accomodate that behaviour. (See also b/31304115)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358793002

Review-Url: https://codereview.chromium.org/2358793002

src/core/SkLiteDL.cpp
src/core/SkLiteDL.h

index 3175447..8e64ae0 100644 (file)
@@ -829,3 +829,7 @@ void SkLiteDL::drawAsLayer(SkCanvas* canvas, const SkMatrix* matrix, const SkPai
 
     return fallback_plan();
 }
+
+void SkLiteDL::setBounds(const SkRect& bounds) {
+    fBounds = bounds;
+}
index b18cc54..9ed1365 100644 (file)
@@ -91,6 +91,8 @@ public:
     void drawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[], int,
                    SkXfermode::Mode, const SkRect*, const SkPaint*);
 
+    void setBounds(const SkRect& bounds);
+
 private:
     SkLiteDL(SkRect);
     ~SkLiteDL();