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

Side by Side Diff: src/core/SkRemote.h

Issue 1432593002: SkRemote: saveLayer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | src/core/SkRemote.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 2015 Google Inc. 2 * Copyright 2015 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 SkRemote_DEFINED 8 #ifndef SkRemote_DEFINED
9 #define SkRemote_DEFINED 9 #define SkRemote_DEFINED
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual ID define(SkXfermode*) = 0; 74 virtual ID define(SkXfermode*) = 0;
75 virtual ID define(SkMaskFilter*) = 0; 75 virtual ID define(SkMaskFilter*) = 0;
76 virtual ID define(SkColorFilter*) = 0; 76 virtual ID define(SkColorFilter*) = 0;
77 virtual ID define(SkRasterizer*) = 0; 77 virtual ID define(SkRasterizer*) = 0;
78 virtual ID define(SkDrawLooper*) = 0; 78 virtual ID define(SkDrawLooper*) = 0;
79 virtual ID define(SkImageFilter*) = 0; 79 virtual ID define(SkImageFilter*) = 0;
80 virtual ID define(SkAnnotation*) = 0; 80 virtual ID define(SkAnnotation*) = 0;
81 81
82 virtual void undefine(ID) = 0; 82 virtual void undefine(ID) = 0;
83 83
84 virtual void save() = 0;
85 virtual void restore() = 0;
86
87 virtual void setMatrix(ID matrix) = 0;
88
89 // TODO: do these all belong here in CommonIDs? 84 // TODO: do these all belong here in CommonIDs?
90 struct CommonIDs { 85 struct CommonIDs {
91 ID misc, patheffect, shader, xfermode, maskfilter, 86 ID misc, patheffect, shader, xfermode, maskfilter,
92 colorfilter, rasterizer, looper, imagefilter, annotation; 87 colorfilter, rasterizer, looper, imagefilter, annotation;
93 }; 88 };
94 89
90 virtual void save() = 0;
91 virtual void restore() = 0;
92 virtual void saveLayer(ID bounds, CommonIDs, SkCanvas::SaveFlags) = 0;
93
94 virtual void setMatrix(ID matrix) = 0;
95
95 virtual void clipPath(ID path, SkRegion::Op, bool aa) = 0; 96 virtual void clipPath(ID path, SkRegion::Op, bool aa) = 0;
96 virtual void fillPath(ID path, CommonIDs) = 0; 97 virtual void fillPath(ID path, CommonIDs) = 0;
97 virtual void strokePath(ID path, CommonIDs, ID stroke) = 0; 98 virtual void strokePath(ID path, CommonIDs, ID stroke) = 0;
98 }; 99 };
99 100
100 // None of these factories take ownership of their arguments. 101 // None of these factories take ownership of their arguments.
101 102
102 // Returns a new SkCanvas that translates to the Encoder API. 103 // Returns a new SkCanvas that translates to the Encoder API.
103 SkCanvas* NewCanvas(Encoder*); 104 SkCanvas* NewCanvas(Encoder*);
104 // Returns an Encoder that translates back to the SkCanvas API. 105 // Returns an Encoder that translates back to the SkCanvas API.
105 Encoder* NewDecoder(SkCanvas*); 106 Encoder* NewDecoder(SkCanvas*);
106 // Wraps another Encoder with a cache. TODO: parameterize 107 // Wraps another Encoder with a cache. TODO: parameterize
107 Encoder* NewCachingEncoder(Encoder*); 108 Encoder* NewCachingEncoder(Encoder*);
108 109
109 } // namespace SkRemote 110 } // namespace SkRemote
110 111
111 #endif//SkRemote_DEFINED 112 #endif//SkRemote_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkRemote.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698