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

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

Issue 2105113002: add annotations to debugger (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixes Created 4 years, 5 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 | « tools/debugger/SkDebugCanvas.cpp ('k') | tools/debugger/SkDrawCommand.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SKDRAWCOMMAND_H_ 8 #ifndef SKDRAWCOMMAND_H_
9 #define SKDRAWCOMMAND_H_ 9 #define SKDRAWCOMMAND_H_
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 class SK_API SkDrawCommand { 22 class SK_API SkDrawCommand {
23 public: 23 public:
24 enum OpType { 24 enum OpType {
25 kBeginDrawPicture_OpType, 25 kBeginDrawPicture_OpType,
26 kClipPath_OpType, 26 kClipPath_OpType,
27 kClipRegion_OpType, 27 kClipRegion_OpType,
28 kClipRect_OpType, 28 kClipRect_OpType,
29 kClipRRect_OpType, 29 kClipRRect_OpType,
30 kConcat_OpType, 30 kConcat_OpType,
31 kDrawAnnotation_OpType,
31 kDrawBitmap_OpType, 32 kDrawBitmap_OpType,
32 kDrawBitmapNine_OpType, 33 kDrawBitmapNine_OpType,
33 kDrawBitmapRect_OpType, 34 kDrawBitmapRect_OpType,
34 kDrawClear_OpType, 35 kDrawClear_OpType,
35 kDrawDRRect_OpType, 36 kDrawDRRect_OpType,
36 kDrawImage_OpType, 37 kDrawImage_OpType,
37 kDrawImageRect_OpType, 38 kDrawImageRect_OpType,
38 kDrawOval_OpType, 39 kDrawOval_OpType,
39 kDrawPaint_OpType, 40 kDrawPaint_OpType,
40 kDrawPatch_OpType, 41 kDrawPatch_OpType,
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 void execute(SkCanvas* canvas) const override; 241 void execute(SkCanvas* canvas) const override;
241 Json::Value toJSON(UrlDataManager& urlDataManager) const override; 242 Json::Value toJSON(UrlDataManager& urlDataManager) const override;
242 static SkConcatCommand* fromJSON(Json::Value& command, UrlDataManager& urlDa taManager); 243 static SkConcatCommand* fromJSON(Json::Value& command, UrlDataManager& urlDa taManager);
243 244
244 private: 245 private:
245 SkMatrix fMatrix; 246 SkMatrix fMatrix;
246 247
247 typedef SkDrawCommand INHERITED; 248 typedef SkDrawCommand INHERITED;
248 }; 249 };
249 250
251 class SkDrawAnnotationCommand : public SkDrawCommand {
252 public:
253 SkDrawAnnotationCommand(const SkRect&, const char key[], sk_sp<SkData> value );
254 void execute(SkCanvas* canvas) const override;
255 Json::Value toJSON(UrlDataManager& urlDataManager) const override;
256 static SkDrawAnnotationCommand* fromJSON(Json::Value& command, UrlDataManage r& urlDataManager);
257
258 private:
259 SkRect fRect;
260 SkString fKey;
261 sk_sp<SkData> fValue;
262
263 typedef SkDrawCommand INHERITED;
264 };
265
250 class SkDrawBitmapCommand : public SkDrawCommand { 266 class SkDrawBitmapCommand : public SkDrawCommand {
251 public: 267 public:
252 SkDrawBitmapCommand(const SkBitmap& bitmap, SkScalar left, SkScalar top, 268 SkDrawBitmapCommand(const SkBitmap& bitmap, SkScalar left, SkScalar top,
253 const SkPaint* paint); 269 const SkPaint* paint);
254 void execute(SkCanvas* canvas) const override; 270 void execute(SkCanvas* canvas) const override;
255 bool render(SkCanvas* canvas) const override; 271 bool render(SkCanvas* canvas) const override;
256 Json::Value toJSON(UrlDataManager& urlDataManager) const override; 272 Json::Value toJSON(UrlDataManager& urlDataManager) const override;
257 static SkDrawBitmapCommand* fromJSON(Json::Value& command, UrlDataManager& u rlDataManager); 273 static SkDrawBitmapCommand* fromJSON(Json::Value& command, UrlDataManager& u rlDataManager);
258 274
259 private: 275 private:
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 static SkSetMatrixCommand* fromJSON(Json::Value& command, UrlDataManager& ur lDataManager); 703 static SkSetMatrixCommand* fromJSON(Json::Value& command, UrlDataManager& ur lDataManager);
688 704
689 private: 705 private:
690 SkMatrix fUserMatrix; 706 SkMatrix fUserMatrix;
691 SkMatrix fMatrix; 707 SkMatrix fMatrix;
692 708
693 typedef SkDrawCommand INHERITED; 709 typedef SkDrawCommand INHERITED;
694 }; 710 };
695 711
696 #endif 712 #endif
OLDNEW
« no previous file with comments | « tools/debugger/SkDebugCanvas.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698