Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / include / utils / SkDeferredCanvas.h
index 89cb145..5f781f8 100644 (file)
@@ -89,6 +89,11 @@ public:
     bool isFreshFrame() const;
 
     /**
+     * Returns canvas's size.
+     */
+    SkISize getCanvasSize() const;
+
+    /**
      *  Returns true if the canvas has recorded draw commands that have
      *  not yet been played back.
      */
@@ -187,6 +192,8 @@ protected:
                                 SkScalar constY, const SkPaint&) SK_OVERRIDE;
     virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
                                   const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE;
+    virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
+                                const SkPaint& paint) SK_OVERRIDE;
     virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
                              const SkPoint texCoords[4], SkXfermode* xmode,
                              const SkPaint& paint) SK_OVERRIDE;
@@ -248,6 +255,9 @@ private:
     size_t fBitmapSizeThreshold;
     bool   fDeferredDrawing;
 
+    mutable SkISize fCachedCanvasSize;
+    mutable bool    fCachedCanvasSizeDirty;
+
     friend class SkDeferredCanvasTester; // for unit testing
     typedef SkCanvas INHERITED;
 };