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

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

Issue 1705133002: Add GrGpu support for Vulkan command buffer flush (Closed) Base URL: https://chromium.googlesource.com/skia@master
Patch Set: Merge postFlush and performFlushWorkaround Created 4 years, 10 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 | « no previous file | src/gpu/GrGpu.h » ('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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrDrawTarget.h" 9 #include "GrDrawTarget.h"
10 10
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 bounds.roundOut(&ibounds); 207 bounds.roundOut(&ibounds);
208 // In multi-draw buffer all the batches use the same render target a nd we won't need to 208 // In multi-draw buffer all the batches use the same render target a nd we won't need to
209 // get the batchs bounds. 209 // get the batchs bounds.
210 if (GrRenderTarget* rt = fBatches[i]->renderTarget()) { 210 if (GrRenderTarget* rt = fBatches[i]->renderTarget()) {
211 fGpu->drawDebugWireRect(rt, ibounds, 0xFF000000 | random.nextU() ); 211 fGpu->drawDebugWireRect(rt, ibounds, 0xFF000000 | random.nextU() );
212 } 212 }
213 } 213 }
214 fBatches[i]->draw(flushState); 214 fBatches[i]->draw(flushState);
215 } 215 }
216 216
217 fGpu->performFlushWorkaround(); 217 fGpu->finishDrawTarget();
218 } 218 }
219 219
220 void GrDrawTarget::reset() { 220 void GrDrawTarget::reset() {
221 fBatches.reset(); 221 fBatches.reset();
222 } 222 }
223 223
224 void GrDrawTarget::drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBat ch* batch) { 224 void GrDrawTarget::drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBat ch* batch) {
225 // Setup clip 225 // Setup clip
226 GrPipelineBuilder::AutoRestoreStencil ars; 226 GrPipelineBuilder::AutoRestoreStencil ars;
227 GrAppliedClip clip; 227 GrAppliedClip clip;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } 530 }
531 531
532 return true; 532 return true;
533 } 533 }
534 534
535 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 535 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
536 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 536 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
537 this->recordBatch(batch); 537 this->recordBatch(batch);
538 batch->unref(); 538 batch->unref();
539 } 539 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698