Index: tools/debugger/SkDebugCanvas.h |
diff --git a/tools/debugger/SkDebugCanvas.h b/tools/debugger/SkDebugCanvas.h |
index 9f785ef7f32bae7d95089f6a0f52e0f70d262930..4264f552009be99c4f152981ee8896b5e79aa7de 100644 |
--- a/tools/debugger/SkDebugCanvas.h |
+++ b/tools/debugger/SkDebugCanvas.h |
@@ -24,27 +24,23 @@ |
class SK_API SkDebugCanvas : public SkCanvas { |
public: |
SkDebugCanvas(int width, int height); |
- |
virtual ~SkDebugCanvas(); |
void toggleFilter(bool toggle) { fFilter = toggle; } |
void setMegaVizMode(bool megaVizMode) { fMegaVizMode = megaVizMode; } |
- |
bool getMegaVizMode() const { return fMegaVizMode; } |
/** |
* Enable or disable overdraw visualization |
*/ |
void setOverdrawViz(bool overdrawViz); |
- |
bool getOverdrawViz() const { return fOverdrawViz; } |
/** |
* Set the color of the clip visualization. An alpha of zero renders the clip invisible. |
*/ |
void setClipVizColor(SkColor clipVizColor) { this->fClipVizColor = clipVizColor; } |
- |
SkColor getClipVizColor() const { return fClipVizColor; } |
void setDrawGpuBatchBounds(bool drawGpuBatchBounds) { |
@@ -55,7 +51,7 @@ |
bool getAllowSimplifyClip() const { return fAllowSimplifyClip; } |
- void setPicture(SkPicture *picture) { fPicture = picture; } |
+ void setPicture(SkPicture* picture) { fPicture = picture; } |
/** |
* Enable or disable texure filtering override |
@@ -66,7 +62,7 @@ |
Executes all draw calls to the canvas. |
@param canvas The canvas being drawn to |
*/ |
- void draw(SkCanvas *canvas); |
+ void draw(SkCanvas* canvas); |
/** |
Executes the draw calls up to the specified index. |
@@ -74,19 +70,19 @@ |
@param index The index of the final command being executed |
@param m an optional Mth gpu batch to highlight, or -1 |
*/ |
- void drawTo(SkCanvas *canvas, int index, int m = -1); |
+ void drawTo(SkCanvas* canvas, int index, int m = -1); |
/** |
Returns the most recently calculated transformation matrix |
*/ |
- const SkMatrix &getCurrentMatrix() { |
+ const SkMatrix& getCurrentMatrix() { |
return fMatrix; |
} |
/** |
Returns the most recently calculated clip |
*/ |
- const SkIRect &getCurrentClip() { |
+ const SkIRect& getCurrentClip() { |
return fClip; |
} |
@@ -105,20 +101,20 @@ |
Returns the draw command at the given index. |
@param index The index of the command |
*/ |
- SkDrawCommand *getDrawCommandAt(int index); |
+ SkDrawCommand* getDrawCommandAt(int index); |
/** |
Sets the draw command for a given index. |
@param index The index to overwrite |
@param command The new command |
*/ |
- void setDrawCommandAt(int index, SkDrawCommand *command); |
+ void setDrawCommandAt(int index, SkDrawCommand* command); |
/** |
Returns information about the command at the given index. |
@param index The index of the command |
*/ |
- const SkTDArray<SkString *> *getCommandInfo(int index) const; |
+ const SkTDArray<SkString*>* getCommandInfo(int index) const; |
/** |
Returns the visibility of the command at the given index. |
@@ -130,13 +126,13 @@ |
Returns the vector of draw commands |
*/ |
SK_ATTR_DEPRECATED("please use getDrawCommandAt and getSize instead") |
- const SkTDArray<SkDrawCommand *> &getDrawCommands() const; |
+ const SkTDArray<SkDrawCommand*>& getDrawCommands() const; |
/** |
Returns the vector of draw commands. Do not use this entry |
point - it is going away! |
*/ |
- SkTDArray<SkDrawCommand *> &getDrawCommands(); |
+ SkTDArray<SkDrawCommand*>& getDrawCommands(); |
/** |
Returns length of draw command vector. |
@@ -162,9 +158,9 @@ |
SkDebugCanvas::getSize(). The encoder may use the UrlDataManager to store binary data such |
as images, referring to them via URLs embedded in the JSON. |
*/ |
- Json::Value toJSON(UrlDataManager &urlDataManager, int n, SkCanvas *); |
- |
- Json::Value toJSONBatchList(int n, SkCanvas *); |
+ Json::Value toJSON(UrlDataManager& urlDataManager, int n, SkCanvas*); |
+ |
+ Json::Value toJSONBatchList(int n, SkCanvas*); |
//////////////////////////////////////////////////////////////////////////////// |
// Inherited from SkCanvas |
@@ -174,10 +170,8 @@ |
static const int kVizImageWidth = 256; |
bool isClipEmpty() const override { return false; } |
- |
bool isClipRect() const override { return true; } |
- |
- bool getClipBounds(SkRect *bounds) const override { |
+ bool getClipBounds(SkRect* bounds) const override { |
if (bounds) { |
bounds->setXYWH(0, 0, |
SkIntToScalar(this->imageInfo().width()), |
@@ -185,8 +179,7 @@ |
} |
return true; |
} |
- |
- bool getClipDeviceBounds(SkIRect *bounds) const override { |
+ bool getClipDeviceBounds(SkIRect* bounds) const override { |
if (bounds) { |
bounds->setLargest(); |
} |
@@ -195,20 +188,13 @@ |
protected: |
void willSave() override; |
- |
- SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec &) override; |
- |
+ SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; |
void willRestore() override; |
- void didConcat(const SkMatrix &) override; |
- |
- void didSetMatrix(const SkMatrix &) override; |
- |
-#ifdef SK_EXPERIMENTAL_SHADOWING |
+ void didConcat(const SkMatrix&) override; |
+ void didSetMatrix(const SkMatrix&) override; |
+ |
void didTranslateZ(SkScalar) override; |
-#else |
- void didTranslateZ(SkScalar); |
-#endif |
void onDrawAnnotation(const SkRect&, const char[], SkData*) override; |
void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; |
@@ -254,16 +240,6 @@ |
void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; |
-#ifdef SK_EXPERIMENTAL_SHADOWING |
- void onDrawShadowedPicture(const SkPicture*, |
- const SkMatrix*, |
- const SkPaint*) override; |
-#else |
- void onDrawShadowedPicture(const SkPicture*, |
- const SkMatrix*, |
- const SkPaint*); |
-#endif |
- |
void markActiveCommands(int index); |
private: |