just add SkLiteDL::empty()
authormtklein <mtklein@chromium.org>
Mon, 15 Aug 2016 18:43:35 +0000 (11:43 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 15 Aug 2016 18:43:35 +0000 (11:43 -0700)
TBR=djsollen@google.com

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

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

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

index 73d6d16dbd7cca92ac1e57a258e2c1e1dc15ae2e..d6498897706cd141482821cd84b45821e1ffa118 100644 (file)
@@ -755,6 +755,10 @@ SkRect SkLiteDL::onGetBounds() {
     return fBounds;
 }
 
+bool SkLiteDL::empty() const {
+    return fUsed == 0;
+}
+
 #if !defined(SK_LITEDL_USES)
     #define  SK_LITEDL_USES 16
 #endif
index 07983662cc3c6c2aeb580dab3f481cdec883b011..27e3479e0378e7eeb71045cf1917a3b2f7cec7c3 100644 (file)
@@ -25,6 +25,7 @@ public:
 
     void optimizeFor(GrContext*);
     void makeThreadsafe();
+    bool empty() const;
 
     void save();
     void saveLayer(const SkRect*, const SkPaint*, const SkImageFilter*, SkCanvas::SaveLayerFlags);