Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: tools/debugger/SkDebugCanvas.h

Issue 1777203003: Fix some bugs and performance issues with skiaserve (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrAuditTrail.cpp ('k') | tools/debugger/SkDebugCanvas.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SKDEBUGCANVAS_H_ 10 #ifndef SKDEBUGCANVAS_H_
11 #define SKDEBUGCANVAS_H_ 11 #define SKDEBUGCANVAS_H_
12 12
13 #include "SkCanvas.h" 13 #include "SkCanvas.h"
14 #include "SkDrawCommand.h" 14 #include "SkDrawCommand.h"
15 #include "SkPath.h" 15 #include "SkPath.h"
16 #include "SkPathOps.h" 16 #include "SkPathOps.h"
17 #include "SkPicture.h" 17 #include "SkPicture.h"
18 #include "SkString.h" 18 #include "SkString.h"
19 #include "SkTArray.h" 19 #include "SkTArray.h"
20 #include "UrlDataManager.h" 20 #include "UrlDataManager.h"
21 21
22 class GrAuditTrail;
22 class SkNWayCanvas; 23 class SkNWayCanvas;
23 24
24 class SK_API SkDebugCanvas : public SkCanvas { 25 class SK_API SkDebugCanvas : public SkCanvas {
25 public: 26 public:
26 SkDebugCanvas(int width, int height); 27 SkDebugCanvas(int width, int height);
27 virtual ~SkDebugCanvas(); 28 virtual ~SkDebugCanvas();
28 29
29 void toggleFilter(bool toggle) { fFilter = toggle; } 30 void toggleFilter(bool toggle) { fFilter = toggle; }
30 31
31 void setMegaVizMode(bool megaVizMode) { fMegaVizMode = megaVizMode; } 32 void setMegaVizMode(bool megaVizMode) { fMegaVizMode = megaVizMode; }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 154
154 SkString clipStackData() const { return fClipStackData; } 155 SkString clipStackData() const { return fClipStackData; }
155 156
156 /** 157 /**
157 Returns a JSON object representing up to the Nth draw, where N is less t han 158 Returns a JSON object representing up to the Nth draw, where N is less t han
158 SkDebugCanvas::getSize(). The encoder may use the UrlDataManager to stor e binary data such 159 SkDebugCanvas::getSize(). The encoder may use the UrlDataManager to stor e binary data such
159 as images, referring to them via URLs embedded in the JSON. 160 as images, referring to them via URLs embedded in the JSON.
160 */ 161 */
161 Json::Value toJSON(UrlDataManager& urlDataManager, int n, SkCanvas*); 162 Json::Value toJSON(UrlDataManager& urlDataManager, int n, SkCanvas*);
162 163
164 Json::Value toJSONBatchList(int n, SkCanvas*);
165
163 //////////////////////////////////////////////////////////////////////////////// 166 ////////////////////////////////////////////////////////////////////////////////
164 // Inherited from SkCanvas 167 // Inherited from SkCanvas
165 //////////////////////////////////////////////////////////////////////////////// 168 ////////////////////////////////////////////////////////////////////////////////
166 169
167 static const int kVizImageHeight = 256; 170 static const int kVizImageHeight = 256;
168 static const int kVizImageWidth = 256; 171 static const int kVizImageWidth = 256;
169 172
170 bool isClipEmpty() const override { return false; } 173 bool isClipEmpty() const override { return false; }
171 bool isClipRect() const override { return true; } 174 bool isClipRect() const override { return true; }
172 bool getClipBounds(SkRect* bounds) const override { 175 bool getClipBounds(SkRect* bounds) const override {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 void resetClipStackData() { fClipStackData.reset(); fCalledAddStackData = fa lse; } 280 void resetClipStackData() { fClipStackData.reset(); fCalledAddStackData = fa lse; }
278 281
279 void addClipStackData(const SkPath& devPath, const SkPath& operand, SkRegion ::Op elementOp); 282 void addClipStackData(const SkPath& devPath, const SkPath& operand, SkRegion ::Op elementOp);
280 void addPathData(const SkPath& path, const char* pathName); 283 void addPathData(const SkPath& path, const char* pathName);
281 bool lastClipStackData(const SkPath& devPath); 284 bool lastClipStackData(const SkPath& devPath);
282 void outputConicPoints(const SkPoint* pts, SkScalar weight); 285 void outputConicPoints(const SkPoint* pts, SkScalar weight);
283 void outputPoints(const SkPoint* pts, int count); 286 void outputPoints(const SkPoint* pts, int count);
284 void outputPointsCommon(const SkPoint* pts, int count); 287 void outputPointsCommon(const SkPoint* pts, int count);
285 void outputScalar(SkScalar num); 288 void outputScalar(SkScalar num);
286 289
290 GrAuditTrail* getAuditTrail(SkCanvas*);
291
287 void updatePaintFilterCanvas(); 292 void updatePaintFilterCanvas();
293 void drawAndCollectBatches(int n, SkCanvas*);
294 void cleanupAuditTrail(SkCanvas*);
288 295
289 typedef SkCanvas INHERITED; 296 typedef SkCanvas INHERITED;
290 }; 297 };
291 298
292 #endif 299 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAuditTrail.cpp ('k') | tools/debugger/SkDebugCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698