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

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

Issue 763593002: Revert of some cleanup around GrGpu/GrDrawTarget copySurface (Closed) Base URL: https://skia.googlesource.com/skia.git@isSameAs
Patch Set: Created 6 years 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/GrInOrderDrawBuffer.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 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return this->onWriteTexturePixels(texture, left, top, width, height, 202 return this->onWriteTexturePixels(texture, left, top, width, height,
203 config, buffer, rowBytes); 203 config, buffer, rowBytes);
204 } 204 }
205 205
206 void GrGpu::resolveRenderTarget(GrRenderTarget* target) { 206 void GrGpu::resolveRenderTarget(GrRenderTarget* target) {
207 SkASSERT(target); 207 SkASSERT(target);
208 this->handleDirtyContext(); 208 this->handleDirtyContext();
209 this->onResolveRenderTarget(target); 209 this->onResolveRenderTarget(target);
210 } 210 }
211 211
212 void GrGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) {
213 // Make the dst of the copy be a render target because the default copySurfa ce draws to the dst.
214 desc->fOrigin = kDefault_GrSurfaceOrigin;
215 desc->fFlags = kRenderTarget_GrSurfaceFlag | kNoStencil_GrSurfaceFlag;
216 desc->fConfig = src->config();
217 }
218
212 typedef GrTraceMarkerSet::Iter TMIter; 219 typedef GrTraceMarkerSet::Iter TMIter;
213 void GrGpu::saveActiveTraceMarkers() { 220 void GrGpu::saveActiveTraceMarkers() {
214 if (this->caps()->gpuTracingSupport()) { 221 if (this->caps()->gpuTracingSupport()) {
215 SkASSERT(0 == fStoredTraceMarkers.count()); 222 SkASSERT(0 == fStoredTraceMarkers.count());
216 fStoredTraceMarkers.addSet(fActiveTraceMarkers); 223 fStoredTraceMarkers.addSet(fActiveTraceMarkers);
217 for (TMIter iter = fStoredTraceMarkers.begin(); iter != fStoredTraceMark ers.end(); ++iter) { 224 for (TMIter iter = fStoredTraceMarkers.begin(); iter != fStoredTraceMark ers.end(); ++iter) {
218 this->removeGpuTraceMarker(&(*iter)); 225 this->removeGpuTraceMarker(&(*iter));
219 } 226 }
220 } 227 }
221 } 228 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 this->handleDirtyContext(); 326 this->handleDirtyContext();
320 327
321 if (!this->flushGraphicsState(ds, kDrawPaths_DrawType)) { 328 if (!this->flushGraphicsState(ds, kDrawPaths_DrawType)) {
322 return; 329 return;
323 } 330 }
324 331
325 pathRange->willDrawPaths(indices, indexType, count); 332 pathRange->willDrawPaths(indices, indexType, count);
326 this->pathRendering()->drawPaths(pathRange, indices, indexType, transformVal ues, 333 this->pathRendering()->drawPaths(pathRange, indices, indexType, transformVal ues,
327 transformType, count, stencilSettings); 334 transformType, count, stencilSettings);
328 } 335 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698