diff options
author | 2016-07-21 09:24:16 -0700 | |
---|---|---|
committer | 2016-07-21 09:24:16 -0700 | |
commit | 33d325890e549c113a258248002246b46e8040b2 (patch) | |
tree | edb97ce0fe48078a14d82b2d1e8b3b5194025032 /tools/debugger/SkDebugCanvas.h | |
parent | 5fa7f30331585f78cf0f81ac185abbff1fee1152 (diff) |
Revert of Creating framework for drawShadowedPicture (patchset #14 id:260001 of https://codereview.chromium.org/2146073003/ )
Reason for revert:
Decided to re-wait for a final LGTM.
Already found a bug in variable naming to fix.
Original issue's description:
> Creating framework for drawShadowedPicture
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146073003
>
> Committed: https://skia.googlesource.com/skia/+/0ae097d116f4332be02a135ffc99c162473dee6a
TBR=reed@google.com,robertphillips@google.com,bsalomon@google.com,jvanverth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2167223002
Diffstat (limited to 'tools/debugger/SkDebugCanvas.h')
-rw-r--r-- | tools/debugger/SkDebugCanvas.h | 58 |
1 files changed, 17 insertions, 41 deletions
diff --git a/tools/debugger/SkDebugCanvas.h b/tools/debugger/SkDebugCanvas.h index 9f785ef7f3..4264f55200 100644 --- a/tools/debugger/SkDebugCanvas.h +++ b/tools/debugger/SkDebugCanvas.h @@ -24,27 +24,23 @@ class SkNWayCanvas; 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 @@ public: 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 @@ public: 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 @@ public: @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 @@ public: 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 @@ public: 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 @@ public: 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 toJSON(UrlDataManager& urlDataManager, int n, SkCanvas*); - Json::Value toJSONBatchList(int n, SkCanvas *); + Json::Value toJSONBatchList(int n, SkCanvas*); //////////////////////////////////////////////////////////////////////////////// // Inherited from SkCanvas @@ -174,10 +170,8 @@ public: 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 @@ public: } return true; } - - bool getClipDeviceBounds(SkIRect *bounds) const override { + bool getClipDeviceBounds(SkIRect* bounds) const override { if (bounds) { bounds->setLargest(); } @@ -195,20 +188,13 @@ public: 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; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; -#ifdef SK_EXPERIMENTAL_SHADOWING 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 @@ protected: 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: |