chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef SKDRAWCOMMAND_H_ |
| 9 | #define SKDRAWCOMMAND_H_ |
| 10 | |
ethannicholas | f67531f | 2016-03-21 10:19:39 -0700 | [diff] [blame] | 11 | #include "png.h" |
| 12 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 13 | #include "SkCanvas.h" |
bungeman | d3ebb48 | 2015-08-05 13:57:49 -0700 | [diff] [blame] | 14 | #include "SkTLazy.h" |
| 15 | #include "SkPath.h" |
| 16 | #include "SkRRect.h" |
reed | 45561a0 | 2016-07-07 12:47:17 -0700 | [diff] [blame^] | 17 | #include "SkRSXform.h" |
robertphillips@google.com | 0a4805e | 2013-05-29 13:24:23 +0000 | [diff] [blame] | 18 | #include "SkString.h" |
bungeman | d3ebb48 | 2015-08-05 13:57:49 -0700 | [diff] [blame] | 19 | #include "SkTDArray.h" |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 20 | #include "SkJSONCPP.h" |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 21 | #include "UrlDataManager.h" |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 22 | |
fmalita@google.com | 86681b3 | 2013-06-13 20:59:14 +0000 | [diff] [blame] | 23 | class SK_API SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 24 | public: |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 25 | enum OpType { |
fmalita | 160ebb2 | 2015-04-01 20:58:37 -0700 | [diff] [blame] | 26 | kBeginDrawPicture_OpType, |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 27 | kClipPath_OpType, |
| 28 | kClipRegion_OpType, |
| 29 | kClipRect_OpType, |
| 30 | kClipRRect_OpType, |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 31 | kConcat_OpType, |
reed | 97660cc | 2016-06-28 18:54:19 -0700 | [diff] [blame] | 32 | kDrawAnnotation_OpType, |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 33 | kDrawBitmap_OpType, |
| 34 | kDrawBitmapNine_OpType, |
| 35 | kDrawBitmapRect_OpType, |
| 36 | kDrawClear_OpType, |
| 37 | kDrawDRRect_OpType, |
fmalita | 651c920 | 2015-07-22 10:23:01 -0700 | [diff] [blame] | 38 | kDrawImage_OpType, |
| 39 | kDrawImageRect_OpType, |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 40 | kDrawOval_OpType, |
| 41 | kDrawPaint_OpType, |
| 42 | kDrawPatch_OpType, |
| 43 | kDrawPath_OpType, |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 44 | kDrawPoints_OpType, |
| 45 | kDrawPosText_OpType, |
| 46 | kDrawPosTextH_OpType, |
| 47 | kDrawRect_OpType, |
| 48 | kDrawRRect_OpType, |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 49 | kDrawText_OpType, |
| 50 | kDrawTextBlob_OpType, |
| 51 | kDrawTextOnPath_OpType, |
reed | 45561a0 | 2016-07-07 12:47:17 -0700 | [diff] [blame^] | 52 | kDrawTextRSXform_OpType, |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 53 | kDrawVertices_OpType, |
fmalita | 160ebb2 | 2015-04-01 20:58:37 -0700 | [diff] [blame] | 54 | kEndDrawPicture_OpType, |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 55 | kRestore_OpType, |
| 56 | kSave_OpType, |
| 57 | kSaveLayer_OpType, |
| 58 | kSetMatrix_OpType, |
robertphillips | 72942b8e | 2015-02-12 06:37:12 -0800 | [diff] [blame] | 59 | |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 60 | kLast_OpType = kSetMatrix_OpType |
| 61 | }; |
| 62 | |
| 63 | static const int kOpTypeCount = kLast_OpType + 1; |
| 64 | |
halcanary | 9d524f2 | 2016-03-29 09:03:52 -0700 | [diff] [blame] | 65 | static void WritePNG(const png_bytep rgba, png_uint_32 width, png_uint_32 height, |
msarett | a5cf4f4 | 2016-06-30 10:06:51 -0700 | [diff] [blame] | 66 | SkWStream& out, bool isOpaque); |
ethannicholas | f67531f | 2016-03-21 10:19:39 -0700 | [diff] [blame] | 67 | |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 68 | SkDrawCommand(OpType opType); |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 69 | |
| 70 | virtual ~SkDrawCommand(); |
| 71 | |
fmalita | 8c89c52 | 2014-11-08 16:18:56 -0800 | [diff] [blame] | 72 | virtual SkString toString() const; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 73 | |
fmalita | 8c89c52 | 2014-11-08 16:18:56 -0800 | [diff] [blame] | 74 | virtual const char* toCString() const { |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 75 | return GetCommandString(fOpType); |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 76 | } |
| 77 | |
chudy@google.com | 0b5bbb0 | 2012-07-31 19:55:32 +0000 | [diff] [blame] | 78 | bool isVisible() const { |
| 79 | return fVisible; |
| 80 | } |
| 81 | |
| 82 | void setVisible(bool toggle) { |
| 83 | fVisible = toggle; |
| 84 | } |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 85 | |
fmalita | 8c89c52 | 2014-11-08 16:18:56 -0800 | [diff] [blame] | 86 | const SkTDArray<SkString*>* Info() const { return &fInfo; } |
| 87 | virtual void execute(SkCanvas*) const = 0; |
| 88 | virtual void vizExecute(SkCanvas*) const {} |
robertphillips | 7017168 | 2014-10-16 14:28:28 -0700 | [diff] [blame] | 89 | |
fmalita | 8c89c52 | 2014-11-08 16:18:56 -0800 | [diff] [blame] | 90 | virtual void setUserMatrix(const SkMatrix&) {} |
robertphillips | 7017168 | 2014-10-16 14:28:28 -0700 | [diff] [blame] | 91 | |
mtklein | f0f1411 | 2014-12-12 08:46:25 -0800 | [diff] [blame] | 92 | // The next "active" system is only used by save, saveLayer, and restore. |
| 93 | // It is used to determine which saveLayers are currently active (at a |
commit-bot@chromium.org | 768ac85 | 2014-03-03 16:32:17 +0000 | [diff] [blame] | 94 | // given point in the rendering). |
commit-bot@chromium.org | 57f74e0 | 2014-03-25 23:31:33 +0000 | [diff] [blame] | 95 | // saves just return a kPushLayer action but don't track active state |
| 96 | // restores just return a kPopLayer action |
commit-bot@chromium.org | 1643b2c | 2014-03-03 23:25:41 +0000 | [diff] [blame] | 97 | // saveLayers return kPushLayer but also track the active state |
commit-bot@chromium.org | 768ac85 | 2014-03-03 16:32:17 +0000 | [diff] [blame] | 98 | enum Action { |
| 99 | kNone_Action, |
commit-bot@chromium.org | 1643b2c | 2014-03-03 23:25:41 +0000 | [diff] [blame] | 100 | kPopLayer_Action, |
| 101 | kPushLayer_Action, |
commit-bot@chromium.org | 768ac85 | 2014-03-03 16:32:17 +0000 | [diff] [blame] | 102 | }; |
| 103 | virtual Action action() const { return kNone_Action; } |
| 104 | virtual void setActive(bool active) {} |
| 105 | virtual bool active() const { return false; } |
| 106 | |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 107 | OpType getType() const { return fOpType; } |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 108 | |
robertphillips@google.com | 6ede1fe | 2013-06-06 23:59:28 +0000 | [diff] [blame] | 109 | virtual bool render(SkCanvas* canvas) const { return false; } |
robertphillips@google.com | 6dec8fc | 2012-11-21 17:11:02 +0000 | [diff] [blame] | 110 | |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 111 | virtual Json::Value toJSON(UrlDataManager& urlDataManager) const; |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 112 | |
| 113 | /* Converts a JSON representation of a command into a newly-allocated SkDrawCommand object. It |
| 114 | * is the caller's responsibility to delete this object. This method may return null if an error |
| 115 | * occurs. |
| 116 | */ |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 117 | static SkDrawCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 118 | |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 119 | static const char* GetCommandString(OpType type); |
robertphillips@google.com | 8a1cdae | 2012-11-19 20:44:29 +0000 | [diff] [blame] | 120 | |
joshualitt | bd72413 | 2016-03-03 11:39:38 -0800 | [diff] [blame] | 121 | // Helper methods for converting things to JSON |
brianosman | fad9856 | 2016-05-04 11:06:28 -0700 | [diff] [blame] | 122 | static Json::Value MakeJsonColor(const SkColor color); |
| 123 | static Json::Value MakeJsonPoint(const SkPoint& point); |
| 124 | static Json::Value MakeJsonPoint(SkScalar x, SkScalar y); |
| 125 | static Json::Value MakeJsonRect(const SkRect& rect); |
joshualitt | bd72413 | 2016-03-03 11:39:38 -0800 | [diff] [blame] | 126 | static Json::Value MakeJsonIRect(const SkIRect&); |
| 127 | static Json::Value MakeJsonMatrix(const SkMatrix&); |
brianosman | fad9856 | 2016-05-04 11:06:28 -0700 | [diff] [blame] | 128 | static Json::Value MakeJsonPath(const SkPath& path); |
| 129 | static Json::Value MakeJsonRegion(const SkRegion& region); |
| 130 | static Json::Value MakeJsonPaint(const SkPaint& paint, UrlDataManager& urlDataManager); |
| 131 | |
| 132 | static void flatten(const SkFlattenable* flattenable, Json::Value* target, |
| 133 | UrlDataManager& urlDataManager); |
| 134 | static bool flatten(const SkImage& image, Json::Value* target, |
| 135 | UrlDataManager& urlDataManager); |
| 136 | static bool flatten(const SkBitmap& bitmap, Json::Value* target, |
| 137 | UrlDataManager& urlDataManager); |
joshualitt | bd72413 | 2016-03-03 11:39:38 -0800 | [diff] [blame] | 138 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 139 | protected: |
chudy@google.com | 97cee97 | 2012-08-07 20:41:37 +0000 | [diff] [blame] | 140 | SkTDArray<SkString*> fInfo; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 141 | |
| 142 | private: |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 143 | OpType fOpType; |
commit-bot@chromium.org | 57f74e0 | 2014-03-25 23:31:33 +0000 | [diff] [blame] | 144 | bool fVisible; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 145 | }; |
| 146 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 147 | class SkRestoreCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 148 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 149 | SkRestoreCommand(); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 150 | void execute(SkCanvas* canvas) const override; |
| 151 | Action action() const override { return kPopLayer_Action; } |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 152 | static SkRestoreCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 153 | |
| 154 | private: |
| 155 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 156 | }; |
| 157 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 158 | class SkClearCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 159 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 160 | SkClearCommand(SkColor color); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 161 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 162 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 163 | static SkClearCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 164 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 165 | private: |
| 166 | SkColor fColor; |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 167 | |
| 168 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 169 | }; |
| 170 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 171 | class SkClipPathCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 172 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 173 | SkClipPathCommand(const SkPath& path, SkRegion::Op op, bool doAA); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 174 | void execute(SkCanvas* canvas) const override; |
| 175 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 176 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 177 | static SkClipPathCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 178 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 179 | private: |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 180 | SkPath fPath; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 181 | SkRegion::Op fOp; |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 182 | bool fDoAA; |
robertphillips@google.com | 91217d0 | 2013-03-17 18:33:46 +0000 | [diff] [blame] | 183 | |
| 184 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 185 | }; |
| 186 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 187 | class SkClipRegionCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 188 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 189 | SkClipRegionCommand(const SkRegion& region, SkRegion::Op op); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 190 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 191 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 192 | static SkClipRegionCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 193 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 194 | private: |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 195 | SkRegion fRegion; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 196 | SkRegion::Op fOp; |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 197 | |
| 198 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 199 | }; |
| 200 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 201 | class SkClipRectCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 202 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 203 | SkClipRectCommand(const SkRect& rect, SkRegion::Op op, bool doAA); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 204 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 205 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 206 | static SkClipRectCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
robertphillips@google.com | febc0ec | 2013-03-11 22:53:11 +0000 | [diff] [blame] | 207 | |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 208 | const SkRect& rect() const { return fRect; } |
robertphillips@google.com | febc0ec | 2013-03-11 22:53:11 +0000 | [diff] [blame] | 209 | SkRegion::Op op() const { return fOp; } |
| 210 | bool doAA() const { return fDoAA; } |
| 211 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 212 | private: |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 213 | SkRect fRect; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 214 | SkRegion::Op fOp; |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 215 | bool fDoAA; |
| 216 | |
| 217 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 218 | }; |
| 219 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 220 | class SkClipRRectCommand : public SkDrawCommand { |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 221 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 222 | SkClipRRectCommand(const SkRRect& rrect, SkRegion::Op op, bool doAA); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 223 | void execute(SkCanvas* canvas) const override; |
| 224 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 225 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 226 | static SkClipRRectCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
robertphillips@google.com | febc0ec | 2013-03-11 22:53:11 +0000 | [diff] [blame] | 227 | |
| 228 | const SkRRect& rrect() const { return fRRect; } |
| 229 | SkRegion::Op op() const { return fOp; } |
| 230 | bool doAA() const { return fDoAA; } |
| 231 | |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 232 | private: |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 233 | SkRRect fRRect; |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 234 | SkRegion::Op fOp; |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 235 | bool fDoAA; |
| 236 | |
| 237 | typedef SkDrawCommand INHERITED; |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 238 | }; |
| 239 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 240 | class SkConcatCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 241 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 242 | SkConcatCommand(const SkMatrix& matrix); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 243 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 244 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 245 | static SkConcatCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 246 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 247 | private: |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 248 | SkMatrix fMatrix; |
| 249 | |
| 250 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 251 | }; |
| 252 | |
reed | 97660cc | 2016-06-28 18:54:19 -0700 | [diff] [blame] | 253 | class SkDrawAnnotationCommand : public SkDrawCommand { |
| 254 | public: |
| 255 | SkDrawAnnotationCommand(const SkRect&, const char key[], sk_sp<SkData> value); |
| 256 | void execute(SkCanvas* canvas) const override; |
| 257 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 258 | static SkDrawAnnotationCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
| 259 | |
| 260 | private: |
| 261 | SkRect fRect; |
| 262 | SkString fKey; |
| 263 | sk_sp<SkData> fValue; |
| 264 | |
| 265 | typedef SkDrawCommand INHERITED; |
| 266 | }; |
| 267 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 268 | class SkDrawBitmapCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 269 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 270 | SkDrawBitmapCommand(const SkBitmap& bitmap, SkScalar left, SkScalar top, |
commit-bot@chromium.org | 57f74e0 | 2014-03-25 23:31:33 +0000 | [diff] [blame] | 271 | const SkPaint* paint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 272 | void execute(SkCanvas* canvas) const override; |
| 273 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 274 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 275 | static SkDrawBitmapCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 276 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 277 | private: |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 278 | SkBitmap fBitmap; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 279 | SkScalar fLeft; |
| 280 | SkScalar fTop; |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 281 | SkPaint fPaint; |
| 282 | SkPaint* fPaintPtr; |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 283 | |
| 284 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 285 | }; |
| 286 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 287 | class SkDrawBitmapNineCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 288 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 289 | SkDrawBitmapNineCommand(const SkBitmap& bitmap, const SkIRect& center, |
commit-bot@chromium.org | 57f74e0 | 2014-03-25 23:31:33 +0000 | [diff] [blame] | 290 | const SkRect& dst, const SkPaint* paint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 291 | void execute(SkCanvas* canvas) const override; |
| 292 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 293 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 294 | static SkDrawBitmapNineCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 295 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 296 | private: |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 297 | SkBitmap fBitmap; |
| 298 | SkIRect fCenter; |
| 299 | SkRect fDst; |
| 300 | SkPaint fPaint; |
| 301 | SkPaint* fPaintPtr; |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 302 | |
| 303 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 304 | }; |
| 305 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 306 | class SkDrawBitmapRectCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 307 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 308 | SkDrawBitmapRectCommand(const SkBitmap& bitmap, const SkRect* src, |
commit-bot@chromium.org | eed779d | 2013-08-16 10:24:37 +0000 | [diff] [blame] | 309 | const SkRect& dst, const SkPaint* paint, |
reed | a5517e2 | 2015-07-14 10:54:12 -0700 | [diff] [blame] | 310 | SkCanvas::SrcRectConstraint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 311 | void execute(SkCanvas* canvas) const override; |
| 312 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 313 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 314 | static SkDrawBitmapRectCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
robertphillips@google.com | 3b0a9fe | 2013-01-31 15:56:22 +0000 | [diff] [blame] | 315 | |
robertphillips@google.com | c3410b8 | 2013-03-28 12:25:25 +0000 | [diff] [blame] | 316 | const SkBitmap& bitmap() const { return fBitmap; } |
| 317 | |
robertphillips@google.com | 3b0a9fe | 2013-01-31 15:56:22 +0000 | [diff] [blame] | 318 | // The non-const 'paint' method allows modification of this object's |
| 319 | // SkPaint. For this reason the ctor and setPaint method make a local copy. |
| 320 | // The 'fPaintPtr' member acts a signal that the local SkPaint is valid |
| 321 | // (since only an SkPaint* is passed into the ctor). |
| 322 | const SkPaint* paint() const { return fPaintPtr; } |
| 323 | SkPaint* paint() { return fPaintPtr; } |
| 324 | |
| 325 | void setPaint(const SkPaint& paint) { fPaint = paint; fPaintPtr = &fPaint; } |
| 326 | |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 327 | const SkRect* srcRect() const { return fSrc.isEmpty() ? nullptr : &fSrc; } |
robertphillips@google.com | c3410b8 | 2013-03-28 12:25:25 +0000 | [diff] [blame] | 328 | void setSrcRect(const SkRect& src) { fSrc = src; } |
commit-bot@chromium.org | eed779d | 2013-08-16 10:24:37 +0000 | [diff] [blame] | 329 | |
| 330 | const SkRect& dstRect() const { return fDst; } |
robertphillips@google.com | c3410b8 | 2013-03-28 12:25:25 +0000 | [diff] [blame] | 331 | void setDstRect(const SkRect& dst) { fDst = dst; } |
| 332 | |
reed | a5517e2 | 2015-07-14 10:54:12 -0700 | [diff] [blame] | 333 | SkCanvas::SrcRectConstraint constraint() const { return fConstraint; } |
| 334 | void setConstraint(SkCanvas::SrcRectConstraint constraint) { fConstraint = constraint; } |
commit-bot@chromium.org | eed779d | 2013-08-16 10:24:37 +0000 | [diff] [blame] | 335 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 336 | private: |
commit-bot@chromium.org | eed779d | 2013-08-16 10:24:37 +0000 | [diff] [blame] | 337 | SkBitmap fBitmap; |
| 338 | SkRect fSrc; |
| 339 | SkRect fDst; |
| 340 | SkPaint fPaint; |
| 341 | SkPaint* fPaintPtr; |
reed | a5517e2 | 2015-07-14 10:54:12 -0700 | [diff] [blame] | 342 | SkCanvas::SrcRectConstraint fConstraint; |
robertphillips@google.com | 91217d0 | 2013-03-17 18:33:46 +0000 | [diff] [blame] | 343 | |
| 344 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 345 | }; |
| 346 | |
fmalita | 651c920 | 2015-07-22 10:23:01 -0700 | [diff] [blame] | 347 | class SkDrawImageCommand : public SkDrawCommand { |
| 348 | public: |
| 349 | SkDrawImageCommand(const SkImage* image, SkScalar left, SkScalar top, const SkPaint* paint); |
| 350 | void execute(SkCanvas* canvas) const override; |
| 351 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 352 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 353 | static SkDrawImageCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 354 | |
fmalita | 651c920 | 2015-07-22 10:23:01 -0700 | [diff] [blame] | 355 | private: |
| 356 | SkAutoTUnref<const SkImage> fImage; |
| 357 | SkScalar fLeft; |
| 358 | SkScalar fTop; |
| 359 | SkTLazy<SkPaint> fPaint; |
| 360 | |
| 361 | typedef SkDrawCommand INHERITED; |
| 362 | }; |
| 363 | |
| 364 | class SkDrawImageRectCommand : public SkDrawCommand { |
| 365 | public: |
| 366 | SkDrawImageRectCommand(const SkImage* image, const SkRect* src, const SkRect& dst, |
| 367 | const SkPaint* paint, SkCanvas::SrcRectConstraint constraint); |
| 368 | void execute(SkCanvas* canvas) const override; |
| 369 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 370 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 371 | static SkDrawImageRectCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 372 | |
fmalita | 651c920 | 2015-07-22 10:23:01 -0700 | [diff] [blame] | 373 | private: |
| 374 | SkAutoTUnref<const SkImage> fImage; |
| 375 | SkTLazy<SkRect> fSrc; |
| 376 | SkRect fDst; |
| 377 | SkTLazy<SkPaint> fPaint; |
| 378 | SkCanvas::SrcRectConstraint fConstraint; |
| 379 | |
| 380 | typedef SkDrawCommand INHERITED; |
| 381 | }; |
| 382 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 383 | class SkDrawOvalCommand : public SkDrawCommand { |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 384 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 385 | SkDrawOvalCommand(const SkRect& oval, const SkPaint& paint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 386 | void execute(SkCanvas* canvas) const override; |
| 387 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 388 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 389 | static SkDrawOvalCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 390 | |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 391 | private: |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 392 | SkRect fOval; |
| 393 | SkPaint fPaint; |
| 394 | |
| 395 | typedef SkDrawCommand INHERITED; |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 396 | }; |
| 397 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 398 | class SkDrawPaintCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 399 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 400 | SkDrawPaintCommand(const SkPaint& paint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 401 | void execute(SkCanvas* canvas) const override; |
| 402 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 403 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 404 | static SkDrawPaintCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 405 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 406 | private: |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 407 | SkPaint fPaint; |
| 408 | |
| 409 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 410 | }; |
| 411 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 412 | class SkDrawPathCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 413 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 414 | SkDrawPathCommand(const SkPath& path, const SkPaint& paint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 415 | void execute(SkCanvas* canvas) const override; |
| 416 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 417 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 418 | static SkDrawPathCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
robertphillips@google.com | 6dec8fc | 2012-11-21 17:11:02 +0000 | [diff] [blame] | 419 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 420 | private: |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 421 | SkPath fPath; |
| 422 | SkPaint fPaint; |
robertphillips@google.com | 91217d0 | 2013-03-17 18:33:46 +0000 | [diff] [blame] | 423 | |
| 424 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 425 | }; |
| 426 | |
fmalita | 160ebb2 | 2015-04-01 20:58:37 -0700 | [diff] [blame] | 427 | class SkBeginDrawPictureCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 428 | public: |
fmalita | 160ebb2 | 2015-04-01 20:58:37 -0700 | [diff] [blame] | 429 | SkBeginDrawPictureCommand(const SkPicture* picture, |
| 430 | const SkMatrix* matrix, |
| 431 | const SkPaint* paint); |
| 432 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 433 | void execute(SkCanvas* canvas) const override; |
| 434 | bool render(SkCanvas* canvas) const override; |
commit-bot@chromium.org | e898e9c | 2013-11-21 17:08:12 +0000 | [diff] [blame] | 435 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 436 | private: |
robertphillips | 9b14f26 | 2014-06-04 05:40:44 -0700 | [diff] [blame] | 437 | SkAutoTUnref<const SkPicture> fPicture; |
fmalita | 160ebb2 | 2015-04-01 20:58:37 -0700 | [diff] [blame] | 438 | SkTLazy<SkMatrix> fMatrix; |
| 439 | SkTLazy<SkPaint> fPaint; |
| 440 | |
| 441 | typedef SkDrawCommand INHERITED; |
| 442 | }; |
| 443 | |
| 444 | class SkEndDrawPictureCommand : public SkDrawCommand { |
| 445 | public: |
| 446 | SkEndDrawPictureCommand(bool restore); |
| 447 | |
| 448 | void execute(SkCanvas* canvas) const override; |
| 449 | |
| 450 | private: |
| 451 | bool fRestore; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 452 | |
| 453 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 454 | }; |
| 455 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 456 | class SkDrawPointsCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 457 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 458 | SkDrawPointsCommand(SkCanvas::PointMode mode, size_t count, const SkPoint pts[], |
commit-bot@chromium.org | 57f74e0 | 2014-03-25 23:31:33 +0000 | [diff] [blame] | 459 | const SkPaint& paint); |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 460 | virtual ~SkDrawPointsCommand() { delete [] fPts; } |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 461 | void execute(SkCanvas* canvas) const override; |
| 462 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 463 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 464 | static SkDrawPointsCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 465 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 466 | private: |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 467 | SkCanvas::PointMode fMode; |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 468 | size_t fCount; |
| 469 | SkPoint* fPts; |
| 470 | SkPaint fPaint; |
| 471 | |
| 472 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 473 | }; |
| 474 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 475 | class SkDrawTextCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 476 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 477 | SkDrawTextCommand(const void* text, size_t byteLength, SkScalar x, SkScalar y, |
commit-bot@chromium.org | 57f74e0 | 2014-03-25 23:31:33 +0000 | [diff] [blame] | 478 | const SkPaint& paint); |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 479 | virtual ~SkDrawTextCommand() { delete [] fText; } |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 480 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 481 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 482 | static SkDrawTextCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 483 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 484 | private: |
robertphillips@google.com | 77279cb | 2013-03-25 12:01:45 +0000 | [diff] [blame] | 485 | char* fText; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 486 | size_t fByteLength; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 487 | SkScalar fX; |
| 488 | SkScalar fY; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 489 | SkPaint fPaint; |
| 490 | |
| 491 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 492 | }; |
| 493 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 494 | class SkDrawPosTextCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 495 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 496 | SkDrawPosTextCommand(const void* text, size_t byteLength, const SkPoint pos[], |
| 497 | const SkPaint& paint); |
| 498 | virtual ~SkDrawPosTextCommand() { delete [] fPos; delete [] fText; } |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 499 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 500 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 501 | static SkDrawPosTextCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 502 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 503 | private: |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 504 | char* fText; |
| 505 | size_t fByteLength; |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 506 | SkPoint* fPos; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 507 | SkPaint fPaint; |
| 508 | |
| 509 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 510 | }; |
| 511 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 512 | class SkDrawTextOnPathCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 513 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 514 | SkDrawTextOnPathCommand(const void* text, size_t byteLength, const SkPath& path, |
| 515 | const SkMatrix* matrix, const SkPaint& paint); |
| 516 | virtual ~SkDrawTextOnPathCommand() { delete [] fText; } |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 517 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 518 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 519 | static SkDrawTextOnPathCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 520 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 521 | private: |
robertphillips@google.com | 77279cb | 2013-03-25 12:01:45 +0000 | [diff] [blame] | 522 | char* fText; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 523 | size_t fByteLength; |
| 524 | SkPath fPath; |
| 525 | SkMatrix fMatrix; |
| 526 | SkPaint fPaint; |
| 527 | |
| 528 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 529 | }; |
| 530 | |
reed | 45561a0 | 2016-07-07 12:47:17 -0700 | [diff] [blame^] | 531 | class SkDrawTextRSXformCommand : public SkDrawCommand { |
| 532 | public: |
| 533 | SkDrawTextRSXformCommand(const void* text, size_t byteLength, const SkRSXform[], |
| 534 | const SkRect*, const SkPaint& paint); |
| 535 | ~SkDrawTextRSXformCommand() override { delete[] fText; delete[] fXform; } |
| 536 | void execute(SkCanvas* canvas) const override; |
| 537 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 538 | static SkDrawTextRSXformCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
| 539 | |
| 540 | private: |
| 541 | char* fText; |
| 542 | size_t fByteLength; |
| 543 | SkRSXform* fXform; |
| 544 | SkRect* fCull; |
| 545 | SkRect fCullStorage; |
| 546 | SkPaint fPaint; |
| 547 | |
| 548 | typedef SkDrawCommand INHERITED; |
| 549 | }; |
| 550 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 551 | class SkDrawPosTextHCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 552 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 553 | SkDrawPosTextHCommand(const void* text, size_t byteLength, const SkScalar xpos[], |
| 554 | SkScalar constY, const SkPaint& paint); |
| 555 | virtual ~SkDrawPosTextHCommand() { delete [] fXpos; delete [] fText; } |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 556 | void execute(SkCanvas* canvas) const override; |
bungeman | 51190df | 2016-03-09 07:42:54 -0800 | [diff] [blame] | 557 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 558 | static SkDrawPosTextHCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 559 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 560 | private: |
robertphillips@google.com | a3a09ab | 2013-03-22 12:25:30 +0000 | [diff] [blame] | 561 | SkScalar* fXpos; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 562 | char* fText; |
| 563 | size_t fByteLength; |
| 564 | SkScalar fConstY; |
| 565 | SkPaint fPaint; |
robertphillips@google.com | 91217d0 | 2013-03-17 18:33:46 +0000 | [diff] [blame] | 566 | |
| 567 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 568 | }; |
| 569 | |
fmalita | b742517 | 2014-08-26 07:56:44 -0700 | [diff] [blame] | 570 | class SkDrawTextBlobCommand : public SkDrawCommand { |
| 571 | public: |
| 572 | SkDrawTextBlobCommand(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint); |
| 573 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 574 | void execute(SkCanvas* canvas) const override; |
| 575 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 576 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 577 | static SkDrawTextBlobCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
fmalita | b742517 | 2014-08-26 07:56:44 -0700 | [diff] [blame] | 578 | |
| 579 | private: |
| 580 | SkAutoTUnref<const SkTextBlob> fBlob; |
| 581 | SkScalar fXPos; |
| 582 | SkScalar fYPos; |
| 583 | SkPaint fPaint; |
| 584 | |
| 585 | typedef SkDrawCommand INHERITED; |
| 586 | }; |
| 587 | |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 588 | class SkDrawPatchCommand : public SkDrawCommand { |
| 589 | public: |
| 590 | SkDrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4], |
| 591 | const SkPoint texCoords[4], SkXfermode* xmode, |
| 592 | const SkPaint& paint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 593 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 594 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 595 | static SkDrawPatchCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 596 | |
| 597 | private: |
| 598 | SkPoint fCubics[12]; |
ethannicholas | 1446a9a | 2016-02-10 14:05:02 -0800 | [diff] [blame] | 599 | SkColor* fColorsPtr; |
| 600 | SkColor fColors[4]; |
| 601 | SkPoint* fTexCoordsPtr; |
| 602 | SkPoint fTexCoords[4]; |
robertphillips | 9bafc30 | 2015-02-13 11:13:00 -0800 | [diff] [blame] | 603 | SkAutoTUnref<SkXfermode> fXfermode; |
| 604 | SkPaint fPaint; |
| 605 | |
| 606 | typedef SkDrawCommand INHERITED; |
| 607 | }; |
| 608 | |
| 609 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 610 | class SkDrawRectCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 611 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 612 | SkDrawRectCommand(const SkRect& rect, const SkPaint& paint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 613 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 614 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 615 | static SkDrawRectCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
robertphillips@google.com | febc0ec | 2013-03-11 22:53:11 +0000 | [diff] [blame] | 616 | |
robertphillips@google.com | 91217d0 | 2013-03-17 18:33:46 +0000 | [diff] [blame] | 617 | const SkRect& rect() const { return fRect; } |
| 618 | const SkPaint& paint() const { return fPaint; } |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 619 | private: |
robertphillips@google.com | 91217d0 | 2013-03-17 18:33:46 +0000 | [diff] [blame] | 620 | SkRect fRect; |
| 621 | SkPaint fPaint; |
| 622 | |
| 623 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 624 | }; |
| 625 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 626 | class SkDrawRRectCommand : public SkDrawCommand { |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 627 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 628 | SkDrawRRectCommand(const SkRRect& rrect, const SkPaint& paint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 629 | void execute(SkCanvas* canvas) const override; |
| 630 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 631 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 632 | static SkDrawRRectCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 633 | |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 634 | private: |
| 635 | SkRRect fRRect; |
robertphillips@google.com | febc0ec | 2013-03-11 22:53:11 +0000 | [diff] [blame] | 636 | SkPaint fPaint; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 637 | |
| 638 | typedef SkDrawCommand INHERITED; |
robertphillips@google.com | 67baba4 | 2013-01-02 20:20:31 +0000 | [diff] [blame] | 639 | }; |
| 640 | |
commit-bot@chromium.org | 3d30520 | 2014-02-24 17:28:55 +0000 | [diff] [blame] | 641 | class SkDrawDRRectCommand : public SkDrawCommand { |
| 642 | public: |
| 643 | SkDrawDRRectCommand(const SkRRect& outer, const SkRRect& inner, |
| 644 | const SkPaint& paint); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 645 | void execute(SkCanvas* canvas) const override; |
| 646 | bool render(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 647 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 648 | static SkDrawDRRectCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 649 | |
commit-bot@chromium.org | 3d30520 | 2014-02-24 17:28:55 +0000 | [diff] [blame] | 650 | private: |
| 651 | SkRRect fOuter; |
| 652 | SkRRect fInner; |
| 653 | SkPaint fPaint; |
| 654 | |
| 655 | typedef SkDrawCommand INHERITED; |
| 656 | }; |
| 657 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 658 | class SkDrawVerticesCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 659 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 660 | SkDrawVerticesCommand(SkCanvas::VertexMode vmode, int vertexCount, |
| 661 | const SkPoint vertices[], const SkPoint texs[], |
| 662 | const SkColor colors[], SkXfermode* xfermode, |
| 663 | const uint16_t indices[], int indexCount, |
| 664 | const SkPaint& paint); |
| 665 | virtual ~SkDrawVerticesCommand(); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 666 | void execute(SkCanvas* canvas) const override; |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 667 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 668 | private: |
| 669 | SkCanvas::VertexMode fVmode; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 670 | int fVertexCount; |
| 671 | SkPoint* fVertices; |
| 672 | SkPoint* fTexs; |
| 673 | SkColor* fColors; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 674 | SkXfermode* fXfermode; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 675 | uint16_t* fIndices; |
| 676 | int fIndexCount; |
| 677 | SkPaint fPaint; |
| 678 | |
| 679 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 680 | }; |
| 681 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 682 | class SkSaveCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 683 | public: |
Florin Malita | 5f6102d | 2014-06-30 10:13:28 -0400 | [diff] [blame] | 684 | SkSaveCommand(); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 685 | void execute(SkCanvas* canvas) const override; |
| 686 | Action action() const override { return kPushLayer_Action; } |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 687 | static SkSaveCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 688 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 689 | private: |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 690 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 691 | }; |
| 692 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 693 | class SkSaveLayerCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 694 | public: |
reed | 4960eee | 2015-12-18 07:09:18 -0800 | [diff] [blame] | 695 | SkSaveLayerCommand(const SkCanvas::SaveLayerRec&); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 696 | virtual ~SkSaveLayerCommand(); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 697 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 698 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 699 | static SkSaveLayerCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 700 | void vizExecute(SkCanvas* canvas) const override; |
| 701 | Action action() const override{ return kPushLayer_Action; } |
| 702 | void setActive(bool active) override { fActive = active; } |
| 703 | bool active() const override { return fActive; } |
robertphillips@google.com | 3b0a9fe | 2013-01-31 15:56:22 +0000 | [diff] [blame] | 704 | |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 705 | const SkPaint* paint() const { return fPaintPtr; } |
robertphillips@google.com | 3b0a9fe | 2013-01-31 15:56:22 +0000 | [diff] [blame] | 706 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 707 | private: |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 708 | SkRect fBounds; |
| 709 | SkPaint fPaint; |
| 710 | SkPaint* fPaintPtr; |
| 711 | const SkImageFilter* fBackdrop; |
| 712 | uint32_t fSaveLayerFlags; |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 713 | |
reed | 4960eee | 2015-12-18 07:09:18 -0800 | [diff] [blame] | 714 | bool fActive; |
commit-bot@chromium.org | 768ac85 | 2014-03-03 16:32:17 +0000 | [diff] [blame] | 715 | |
robertphillips@google.com | 24bfdac | 2013-03-22 16:33:31 +0000 | [diff] [blame] | 716 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 717 | }; |
| 718 | |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 719 | class SkSetMatrixCommand : public SkDrawCommand { |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 720 | public: |
commit-bot@chromium.org | 7a11591 | 2013-06-18 20:20:55 +0000 | [diff] [blame] | 721 | SkSetMatrixCommand(const SkMatrix& matrix); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 722 | void setUserMatrix(const SkMatrix&) override; |
| 723 | void execute(SkCanvas* canvas) const override; |
ethannicholas | f62a8b7 | 2016-02-11 10:35:21 -0800 | [diff] [blame] | 724 | Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 725 | static SkSetMatrixCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); |
ethannicholas | 50a8dd0 | 2016-02-10 05:40:46 -0800 | [diff] [blame] | 726 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 727 | private: |
robertphillips | 7017168 | 2014-10-16 14:28:28 -0700 | [diff] [blame] | 728 | SkMatrix fUserMatrix; |
robertphillips@google.com | b94b1e7 | 2013-02-19 21:00:26 +0000 | [diff] [blame] | 729 | SkMatrix fMatrix; |
robertphillips@google.com | 0df2a9a | 2013-03-25 11:50:42 +0000 | [diff] [blame] | 730 | |
| 731 | typedef SkDrawCommand INHERITED; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 732 | }; |
| 733 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 734 | #endif |