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

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

Issue 1275543005: Move some work from backend onClear to base class clear (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Pass references and rebase Created 5 years, 4 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') | src/gpu/GrTargetCommands.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 GrTargetCommands_DEFINED 8 #ifndef GrTargetCommands_DEFINED
9 #define GrTargetCommands_DEFINED 9 #define GrTargetCommands_DEFINED
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // This is also used to record a discard by setting the color to GrColor_ILL EGAL 176 // This is also used to record a discard by setting the color to GrColor_ILL EGAL
177 struct Clear : public Cmd { 177 struct Clear : public Cmd {
178 Clear(GrRenderTarget* rt) : Cmd(kClear_CmdType), fRenderTarget(rt) {} 178 Clear(GrRenderTarget* rt) : Cmd(kClear_CmdType), fRenderTarget(rt) {}
179 179
180 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); } 180 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
181 181
182 void execute(GrGpu*) override; 182 void execute(GrGpu*) override;
183 183
184 SkIRect fRect; 184 SkIRect fRect;
185 GrColor fColor; 185 GrColor fColor;
186 bool fCanIgnoreRect;
187 186
188 private: 187 private:
189 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; 188 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
190 }; 189 };
191 190
192 // This command is ONLY used by the clip mask manager to clear the stencil c lip bits 191 // This command is ONLY used by the clip mask manager to clear the stencil c lip bits
193 struct ClearStencilClip : public Cmd { 192 struct ClearStencilClip : public Cmd {
194 ClearStencilClip(GrRenderTarget* rt) : Cmd(kClearStencil_CmdType), fRend erTarget(rt) {} 193 ClearStencilClip(GrRenderTarget* rt) : Cmd(kClearStencil_CmdType), fRend erTarget(rt) {}
195 194
196 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); } 195 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 262
264 CmdBuffer* cmdBuffer() { return &fCmdBuffer; } 263 CmdBuffer* cmdBuffer() { return &fCmdBuffer; }
265 GrBatchTarget* batchTarget() { return &fBatchTarget; } 264 GrBatchTarget* batchTarget() { return &fBatchTarget; }
266 265
267 CmdBuffer fCmdBuffer; 266 CmdBuffer fCmdBuffer;
268 GrBatchTarget fBatchTarget; 267 GrBatchTarget fBatchTarget;
269 }; 268 };
270 269
271 #endif 270 #endif
272 271
OLDNEW
« no previous file with comments | « src/gpu/GrReorderCommandBuilder.cpp ('k') | src/gpu/GrTargetCommands.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698