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

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

Issue 1161063003: Revert "Revert of Move copy-surface-as-draw fallback to GrGLGpu. (patchset #12 id:220001 of https:/… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 5 years, 6 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/GrImmediateDrawTarget.cpp ('k') | src/gpu/GrTest.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 "GrInOrderDrawBuffer.h" 8 #include "GrInOrderDrawBuffer.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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 void GrInOrderDrawBuffer::onFlush() { 122 void GrInOrderDrawBuffer::onFlush() {
123 fCommands->flush(this); 123 fCommands->flush(this);
124 ++fDrawID; 124 ++fDrawID;
125 } 125 }
126 126
127 void GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, 127 void GrInOrderDrawBuffer::onCopySurface(GrSurface* dst,
128 GrSurface* src, 128 GrSurface* src,
129 const SkIRect& srcRect, 129 const SkIRect& srcRect,
130 const SkIPoint& dstPoint) { 130 const SkIPoint& dstPoint) {
131 SkASSERT(this->getGpu()->canCopySurface(dst, src, srcRect, dstPoint));
132 GrTargetCommands::Cmd* cmd = fCommands->recordCopySurface(dst, src, srcRect, dstPoint); 131 GrTargetCommands::Cmd* cmd = fCommands->recordCopySurface(dst, src, srcRect, dstPoint);
133 this->recordTraceMarkersIfNecessary(cmd); 132 this->recordTraceMarkersIfNecessary(cmd);
134 } 133 }
135 134
136 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary(GrTargetCommands::Cmd* c md) { 135 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary(GrTargetCommands::Cmd* c md) {
137 if (!cmd) { 136 if (!cmd) {
138 return; 137 return;
139 } 138 }
140 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers(); 139 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers();
141 if (activeTraceMarkers.count() > 0) { 140 if (activeTraceMarkers.count() > 0) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 fPrevState->getPipeline()->isEqual(*state->getPipeline())) { 193 fPrevState->getPipeline()->isEqual(*state->getPipeline())) {
195 this->unallocState(state); 194 this->unallocState(state);
196 } else { 195 } else {
197 fPrevState.reset(state); 196 fPrevState.reset(state);
198 } 197 }
199 198
200 this->recordTraceMarkersIfNecessary( 199 this->recordTraceMarkersIfNecessary(
201 fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps())); 200 fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps()));
202 return fPrevState; 201 return fPrevState;
203 } 202 }
OLDNEW
« no previous file with comments | « src/gpu/GrImmediateDrawTarget.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698