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

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

Issue 1142003003: Revert of Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
Patch Set: 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/GrGpu.h ('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 GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrContext* context) 10 GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrContext* context)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 void GrInOrderDrawBuffer::onFlush() { 115 void GrInOrderDrawBuffer::onFlush() {
116 fCommands->flush(this); 116 fCommands->flush(this);
117 ++fDrawID; 117 ++fDrawID;
118 } 118 }
119 119
120 void GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, 120 void GrInOrderDrawBuffer::onCopySurface(GrSurface* dst,
121 GrSurface* src, 121 GrSurface* src,
122 const SkIRect& srcRect, 122 const SkIRect& srcRect,
123 const SkIPoint& dstPoint) { 123 const SkIPoint& dstPoint) {
124 SkASSERT(this->getGpu()->canCopySurface(dst, src, srcRect, dstPoint));
124 GrTargetCommands::Cmd* cmd = fCommands->recordCopySurface(dst, src, srcRect, dstPoint); 125 GrTargetCommands::Cmd* cmd = fCommands->recordCopySurface(dst, src, srcRect, dstPoint);
125 this->recordTraceMarkersIfNecessary(cmd); 126 this->recordTraceMarkersIfNecessary(cmd);
126 } 127 }
127 128
128 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary(GrTargetCommands::Cmd* c md) { 129 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary(GrTargetCommands::Cmd* c md) {
129 if (!cmd) { 130 if (!cmd) {
130 return; 131 return;
131 } 132 }
132 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers(); 133 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers();
133 if (activeTraceMarkers.count() > 0) { 134 if (activeTraceMarkers.count() > 0) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 fPrevState->getPipeline()->isEqual(*state->getPipeline())) { 187 fPrevState->getPipeline()->isEqual(*state->getPipeline())) {
187 this->unallocState(state); 188 this->unallocState(state);
188 } else { 189 } else {
189 fPrevState.reset(state); 190 fPrevState.reset(state);
190 } 191 }
191 192
192 this->recordTraceMarkersIfNecessary( 193 this->recordTraceMarkersIfNecessary(
193 fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps())); 194 fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps()));
194 return fPrevState; 195 return fPrevState;
195 } 196 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698