| Index: skia/ext/analysis_canvas.h
|
| diff --git a/skia/ext/analysis_canvas.h b/skia/ext/analysis_canvas.h
|
| index e2eedd2fddd121f3209682b35a240278b3b4a736..f7787cb940f4e2bd3142559ce7073bc343a5b468 100644
|
| --- a/skia/ext/analysis_canvas.h
|
| +++ b/skia/ext/analysis_canvas.h
|
| @@ -26,6 +26,8 @@ class SK_API AnalysisCanvas : public SkCanvas {
|
| // Returns true if the estimated cost of drawing is below an
|
| // arbitrary threshold.
|
| bool isCheap() const;
|
| + bool getColorIfSolid(SkColor* color) const;
|
| + bool isTransparent() const;
|
|
|
| // Returns the estimated cost of drawing, in arbitrary units.
|
| int getEstimatedCost() const;
|
| @@ -42,8 +44,14 @@ class SK_API AnalysisCanvas : public SkCanvas {
|
|
|
| virtual int saveLayer(const SkRect* bounds, const SkPaint*,
|
| SkCanvas::SaveFlags flags) OVERRIDE;
|
| + virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) OVERRIDE;
|
| +
|
| + virtual void restore() OVERRIDE;
|
| +
|
| private:
|
| typedef SkCanvas INHERITED;
|
| +
|
| + int savedLayerStackSize_;
|
| };
|
|
|
| class SK_API AnalysisDevice : public SkDevice {
|
| @@ -52,6 +60,11 @@ class SK_API AnalysisDevice : public SkDevice {
|
| virtual ~AnalysisDevice();
|
|
|
| int getEstimatedCost() const;
|
| + bool getColorIfSolid(SkColor* color) const;
|
| + bool isTransparent() const;
|
| +
|
| + void setForceNotSolid(bool flag);
|
| + void setForceNotTransparent(bool flag);
|
|
|
| protected:
|
| virtual void clear(SkColor color) OVERRIDE;
|
| @@ -105,6 +118,12 @@ class SK_API AnalysisDevice : public SkDevice {
|
|
|
| private:
|
| typedef SkDevice INHERITED;
|
| +
|
| + bool isForcedNotSolid_;
|
| + bool isForcedNotTransparent_;
|
| + bool isSolidColor_;
|
| + SkColor color_;
|
| + bool isTransparent_;
|
| };
|
|
|
| } // namespace skia
|
|
|