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

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

Issue 1287973003: Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment 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/GrTargetCommands.h ('k') | src/gpu/GrTessellatingPathRenderer.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 #include "GrTargetCommands.h" 8 #include "GrTargetCommands.h"
9 9
10 #include "GrBufferedDrawTarget.h" 10 #include "GrBufferedDrawTarget.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 gpu->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProcessor, *fSt ate->getPipeline(), 68 gpu->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProcessor, *fSt ate->getPipeline(),
69 fState->fBatchTracker); 69 fState->fBatchTracker);
70 fState->fCompiled = true; 70 fState->fCompiled = true;
71 } 71 }
72 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState ->getPipeline(), 72 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState ->getPipeline(),
73 &fState->fDesc, &fState->fBatchTracker, & fStencilSettings); 73 &fState->fDesc, &fState->fBatchTracker, & fStencilSettings);
74 gpu->pathRendering()->drawPaths(args, this->pathRange(), fIndices, fIndexTyp e, fTransforms, 74 gpu->pathRendering()->drawPaths(args, this->pathRange(), fIndices, fIndexTyp e, fTransforms,
75 fTransformType, fCount); 75 fTransformType, fCount);
76 } 76 }
77 77
78 void GrTargetCommands::DrawBatch::execute(GrGpu*) { 78 void GrTargetCommands::DrawBatch::execute(GrGpu* gpu) {
79 fBatchTarget->flushNext(fBatch->numberOfDraws()); 79 fBatchTarget->flushNext(fBatch->numberOfDraws());
80 } 80 }
81 81
82 void GrTargetCommands::Clear::execute(GrGpu* gpu) { 82 void GrTargetCommands::Clear::execute(GrGpu* gpu) {
83 if (GrColor_ILLEGAL == fColor) { 83 if (GrColor_ILLEGAL == fColor) {
84 gpu->discard(this->renderTarget()); 84 gpu->discard(this->renderTarget());
85 } else { 85 } else {
86 gpu->clear(fRect, fColor, this->renderTarget()); 86 gpu->clear(fRect, fColor, this->renderTarget());
87 } 87 }
88 } 88 }
89 89
90 void GrTargetCommands::ClearStencilClip::execute(GrGpu* gpu) { 90 void GrTargetCommands::ClearStencilClip::execute(GrGpu* gpu) {
91 gpu->clearStencilClip(fRect, fInsideClip, this->renderTarget()); 91 gpu->clearStencilClip(fRect, fInsideClip, this->renderTarget());
92 } 92 }
93 93
94 void GrTargetCommands::CopySurface::execute(GrGpu* gpu) { 94 void GrTargetCommands::CopySurface::execute(GrGpu* gpu) {
95 gpu->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); 95 gpu->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint);
96 } 96 }
97
98 void GrTargetCommands::XferBarrier::execute(GrGpu* gpu) {
99 gpu->xferBarrier(fRenderTarget.get(), fBarrierType);
100 }
OLDNEW
« no previous file with comments | « src/gpu/GrTargetCommands.h ('k') | src/gpu/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698