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

Side by Side Diff: src/gpu/GrTargetCommands.h

Issue 1161643002: Reorder across clears (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 5 years, 7 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/GrReorderCommandBuilder.cpp ('k') | no next file » | 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 GrTargetCommands_DEFINED 8 #ifndef GrTargetCommands_DEFINED
9 #define GrTargetCommands_DEFINED 9 #define GrTargetCommands_DEFINED
10 10
(...skipping 17 matching lines...) Expand all
28 : fCmdBuffer(kCmdBufferInitialSizeInBytes) 28 : fCmdBuffer(kCmdBufferInitialSizeInBytes)
29 , fBatchTarget(gpu) { 29 , fBatchTarget(gpu) {
30 } 30 }
31 31
32 class Cmd : ::SkNoncopyable { 32 class Cmd : ::SkNoncopyable {
33 public: 33 public:
34 enum CmdType { 34 enum CmdType {
35 kStencilPath_CmdType = 1, 35 kStencilPath_CmdType = 1,
36 kSetState_CmdType = 2, 36 kSetState_CmdType = 2,
37 kClear_CmdType = 3, 37 kClear_CmdType = 3,
38 kCopySurface_CmdType = 4, 38 kClearStencil_CmdType = 4,
39 kDrawPath_CmdType = 5, 39 kCopySurface_CmdType = 5,
40 kDrawPaths_CmdType = 6, 40 kDrawPath_CmdType = 6,
41 kDrawBatch_CmdType = 7, 41 kDrawPaths_CmdType = 7,
42 kXferBarrier_CmdType = 8, 42 kDrawBatch_CmdType = 8,
43 kXferBarrier_CmdType = 9,
43 }; 44 };
44 45
45 Cmd(CmdType type) : fMarkerID(-1), fType(type) {} 46 Cmd(CmdType type) : fMarkerID(-1), fType(type) {}
46 virtual ~Cmd() {} 47 virtual ~Cmd() {}
47 48
48 virtual void execute(GrGpu*) = 0; 49 virtual void execute(GrGpu*) = 0;
49 50
50 CmdType type() const { return fType; } 51 CmdType type() const { return fType; }
51 52
52 // trace markers 53 // trace markers
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 SkIRect fRect; 184 SkIRect fRect;
184 GrColor fColor; 185 GrColor fColor;
185 bool fCanIgnoreRect; 186 bool fCanIgnoreRect;
186 187
187 private: 188 private:
188 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; 189 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
189 }; 190 };
190 191
191 // This command is ONLY used by the clip mask manager to clear the stencil c lip bits 192 // This command is ONLY used by the clip mask manager to clear the stencil c lip bits
192 struct ClearStencilClip : public Cmd { 193 struct ClearStencilClip : public Cmd {
193 ClearStencilClip(GrRenderTarget* rt) : Cmd(kClear_CmdType), fRenderTarge t(rt) {} 194 ClearStencilClip(GrRenderTarget* rt) : Cmd(kClearStencil_CmdType), fRend erTarget(rt) {}
194 195
195 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); } 196 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
196 197
197 void execute(GrGpu*) override; 198 void execute(GrGpu*) override;
198 199
199 SkIRect fRect; 200 SkIRect fRect;
200 bool fInsideClip; 201 bool fInsideClip;
201 202
202 private: 203 private:
203 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; 204 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 263
263 CmdBuffer* cmdBuffer() { return &fCmdBuffer; } 264 CmdBuffer* cmdBuffer() { return &fCmdBuffer; }
264 GrBatchTarget* batchTarget() { return &fBatchTarget; } 265 GrBatchTarget* batchTarget() { return &fBatchTarget; }
265 266
266 CmdBuffer fCmdBuffer; 267 CmdBuffer fCmdBuffer;
267 GrBatchTarget fBatchTarget; 268 GrBatchTarget fBatchTarget;
268 }; 269 };
269 270
270 #endif 271 #endif
271 272
OLDNEW
« no previous file with comments | « src/gpu/GrReorderCommandBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698