| Index: skia/ext/analysis_canvas.h
|
| diff --git a/skia/ext/analysis_canvas.h b/skia/ext/analysis_canvas.h
|
| index 00fadac1126e55f63f2a1c13642d4a6699da09eb..909a19826d8a8851c1ecc5da8aa5e06eeaa2a15a 100644
|
| --- a/skia/ext/analysis_canvas.h
|
| +++ b/skia/ext/analysis_canvas.h
|
| @@ -20,14 +20,17 @@
|
| // To use: create a SkBitmap with kNo_Config, create an AnalysisDevice
|
| // using that bitmap, and create an AnalysisCanvas using the device.
|
| // Play a picture into the canvas, and then check result.
|
| -class SK_API AnalysisCanvas : public SkCanvas {
|
| +class SK_API AnalysisCanvas : public SkCanvas, public SkDrawPictureCallback {
|
| public:
|
| - explicit AnalysisCanvas(AnalysisDevice* device);
|
| + AnalysisCanvas(AnalysisDevice*);
|
| virtual ~AnalysisCanvas();
|
|
|
| // Returns true when a SkColor can be used to represent result.
|
| bool GetColorIfSolid(SkColor* color) const;
|
| bool HasText() const;
|
| +
|
| + // SkDrawPictureCallback override.
|
| + virtual bool abortDrawing() OVERRIDE;
|
|
|
| // SkCanvas overrides.
|
| virtual bool clipRect(const SkRect& rect,
|
| @@ -60,9 +63,6 @@
|
| // to be derived from SkBaseDevice (rather than SkBitmapDevice)
|
| class SK_API AnalysisDevice : public SkBitmapDevice {
|
| public:
|
| - // |analysis_rect| is in device space.
|
| - AnalysisDevice(const SkBitmap& bitmap, SkRect analysis_rect);
|
| - // Analyze the entire bitmap.
|
| AnalysisDevice(const SkBitmap& bitmap);
|
| virtual ~AnalysisDevice();
|
|
|
| @@ -71,8 +71,6 @@
|
|
|
| void SetForceNotSolid(bool flag);
|
| void SetForceNotTransparent(bool flag);
|
| -
|
| - SkRect AnalysisRect() const { return analysis_rect_; }
|
|
|
| protected:
|
| // SkBaseDevice overrides.
|
| @@ -159,7 +157,6 @@
|
| private:
|
| typedef SkBitmapDevice INHERITED;
|
|
|
| - SkRect analysis_rect_;
|
| bool is_forced_not_solid_;
|
| bool is_forced_not_transparent_;
|
| bool is_solid_color_;
|
|
|