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

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

Issue 1129943004: Initial CL to create Reorder command builder behind a flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more tidying 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/GrCommandBuilder.h ('k') | src/gpu/GrDrawTarget.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 * 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 "GrCommandBuilder.h" 8 #include "GrCommandBuilder.h"
9 9
10 #include "GrInOrderCommandBuilder.h"
11 #include "GrReorderCommandBuilder.h"
12
13 GrCommandBuilder* GrCommandBuilder::Create(GrGpu* gpu, bool reorder) {
14 if (reorder) {
15 return SkNEW_ARGS(GrReorderCommandBuilder, (gpu));
16 } else {
17 return SkNEW_ARGS(GrInOrderCommandBuilder, (gpu));
18 }
19 }
20
10 GrTargetCommands::Cmd* GrCommandBuilder::recordClear(const SkIRect* rect, 21 GrTargetCommands::Cmd* GrCommandBuilder::recordClear(const SkIRect* rect,
11 GrColor color, 22 GrColor color,
12 bool canIgnoreRect, 23 bool canIgnoreRect,
13 GrRenderTarget* renderTarge t) { 24 GrRenderTarget* renderTarge t) {
14 SkASSERT(renderTarget); 25 SkASSERT(renderTarget);
15 26
16 SkIRect r; 27 SkIRect r;
17 if (NULL == rect) { 28 if (NULL == rect) {
18 // We could do something smart and remove previous draws and clears to 29 // We could do something smart and remove previous draws and clears to
19 // the current render target. If we get that smart we have to make sure 30 // the current render target. If we get that smart we have to make sure
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 79
69 GrXferBarrierType barrierType; 80 GrXferBarrierType barrierType;
70 if (!xp.willNeedXferBarrier(rt, caps, &barrierType)) { 81 if (!xp.willNeedXferBarrier(rt, caps, &barrierType)) {
71 return NULL; 82 return NULL;
72 } 83 }
73 84
74 XferBarrier* xb = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), XferBarrier, ()); 85 XferBarrier* xb = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), XferBarrier, ());
75 xb->fBarrierType = barrierType; 86 xb->fBarrierType = barrierType;
76 return xb; 87 return xb;
77 } 88 }
OLDNEW
« no previous file with comments | « src/gpu/GrCommandBuilder.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698