Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / core / SkBBoxRecord.h
index f3d72b0..1d19b70 100644 (file)
@@ -10,6 +10,7 @@
 #define SkBBoxRecord_DEFINED
 
 #include "SkPictureRecord.h"
+#include "SkTDArray.h"
 
 /**
   * This is an abstract SkPictureRecord subclass that intercepts draw calls and computes an
@@ -22,7 +23,7 @@ public:
     SkBBoxRecord(const SkISize& size, uint32_t recordFlags)
         : INHERITED(size, recordFlags) {
     }
-    virtual ~SkBBoxRecord() { }
+    virtual ~SkBBoxRecord();
 
     /**
      * This is called each time we get a bounding box, it will be axis-aligned,
@@ -65,7 +66,13 @@ 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 onDrawPicture(const SkPicture* picture) SK_OVERRIDE;
+    virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
+                             const SkPoint texCoords[4], SkXfermode* xmode,
+                             const SkPaint& paint) SK_OVERRIDE;
+    virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE;
+    virtual void willSave() SK_OVERRIDE;
+    virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE;
+    virtual void willRestore() SK_OVERRIDE;
 
 private:
     /**
@@ -75,6 +82,12 @@ private:
      **/
     bool transformBounds(const SkRect& bounds, const SkPaint* paint);
 
+    /**
+     * Paints from currently-active saveLayers that need to be applied to bounding boxes of all
+     * primitives drawn inside them. We own these pointers.
+     **/
+    SkTDArray<const SkPaint*> fSaveStack;
+
     typedef SkPictureRecord INHERITED;
 };