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

Side by Side Diff: src/gpu/GrBufferedDrawTarget.cpp

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/GrBufferedDrawTarget.h ('k') | src/gpu/GrCaps.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 2011 Google Inc. 2 * Copyright 2011 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 #include "GrBufferedDrawTarget.h" 8 #include "GrBufferedDrawTarget.h"
9 9
10 // We will use the reordering buffer, unless we have NVPR. 10 // We will use the reordering buffer, unless we have NVPR.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 if (!state) { 73 if (!state) {
74 return; 74 return;
75 } 75 }
76 GrTargetCommands::Cmd* cmd = fCommands->recordDrawPaths(state, this, pathPro c, pathRange, 76 GrTargetCommands::Cmd* cmd = fCommands->recordDrawPaths(state, this, pathPro c, pathRange,
77 indices, indexType, transformValues, 77 indices, indexType, transformValues,
78 transformType, count , 78 transformType, count ,
79 stencilSettings, pip elineInfo); 79 stencilSettings, pip elineInfo);
80 this->recordTraceMarkersIfNecessary(cmd); 80 this->recordTraceMarkersIfNecessary(cmd);
81 } 81 }
82 82
83 void GrBufferedDrawTarget::onClear(const SkIRect* rect, GrColor color, 83 void GrBufferedDrawTarget::onClear(const SkIRect& rect, GrColor color,
84 bool canIgnoreRect, GrRenderTarget* renderTarg et) { 84 GrRenderTarget* renderTarget) {
85 GrTargetCommands::Cmd* cmd = fCommands->recordClear(rect, color, canIgnoreRe ct, renderTarget); 85 GrTargetCommands::Cmd* cmd = fCommands->recordClear(rect, color, renderTarge t);
86 this->recordTraceMarkersIfNecessary(cmd); 86 this->recordTraceMarkersIfNecessary(cmd);
87 } 87 }
88 88
89 void GrBufferedDrawTarget::clearStencilClip(const SkIRect& rect, 89 void GrBufferedDrawTarget::clearStencilClip(const SkIRect& rect,
90 bool insideClip, 90 bool insideClip,
91 GrRenderTarget* renderTarget) { 91 GrRenderTarget* renderTarget) {
92 GrTargetCommands::Cmd* cmd = fCommands->recordClearStencilClip(rect, insideC lip, renderTarget); 92 GrTargetCommands::Cmd* cmd = fCommands->recordClearStencilClip(rect, insideC lip, renderTarget);
93 this->recordTraceMarkersIfNecessary(cmd); 93 this->recordTraceMarkersIfNecessary(cmd);
94 } 94 }
95 95
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 fPrevState->getPipeline()->isEqual(*state->getPipeline())) { 192 fPrevState->getPipeline()->isEqual(*state->getPipeline())) {
193 this->unallocState(state); 193 this->unallocState(state);
194 } else { 194 } else {
195 fPrevState.reset(state); 195 fPrevState.reset(state);
196 } 196 }
197 197
198 this->recordTraceMarkersIfNecessary( 198 this->recordTraceMarkersIfNecessary(
199 fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps())); 199 fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps()));
200 return fPrevState; 200 return fPrevState;
201 } 201 }
OLDNEW
« no previous file with comments | « src/gpu/GrBufferedDrawTarget.h ('k') | src/gpu/GrCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698