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

Side by Side Diff: src/gpu/GrGpu.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/GrGpu.h ('k') | src/gpu/GrImmediateDrawTarget.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 /* 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"
11 11
12 #include "GrCaps.h" 12 #include "GrCaps.h"
13 #include "GrContext.h" 13 #include "GrContext.h"
14 #include "GrGpuResourcePriv.h" 14 #include "GrGpuResourcePriv.h"
15 #include "GrIndexBuffer.h" 15 #include "GrIndexBuffer.h"
16 #include "GrPathRendering.h" 16 #include "GrPathRendering.h"
17 #include "GrPipeline.h"
17 #include "GrResourceCache.h" 18 #include "GrResourceCache.h"
18 #include "GrRenderTargetPriv.h" 19 #include "GrRenderTargetPriv.h"
19 #include "GrStencilAttachment.h" 20 #include "GrStencilAttachment.h"
20 #include "GrSurfacePriv.h" 21 #include "GrSurfacePriv.h"
21 #include "GrVertexBuffer.h" 22 #include "GrVertexBuffer.h"
22 #include "GrVertices.h" 23 #include "GrVertices.h"
23 24
24 GrVertices& GrVertices::operator =(const GrVertices& di) { 25 GrVertices& GrVertices::operator =(const GrVertices& di) {
25 fPrimitiveType = di.fPrimitiveType; 26 fPrimitiveType = di.fPrimitiveType;
26 fStartVertex = di.fStartVertex; 27 fStartVertex = di.fStartVertex;
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 this->fActiveTraceMarkers.remove(*marker); 375 this->fActiveTraceMarkers.remove(*marker);
375 this->didRemoveGpuTraceMarker(); 376 this->didRemoveGpuTraceMarker();
376 --fGpuTraceMarkerCount; 377 --fGpuTraceMarkerCount;
377 } 378 }
378 } 379 }
379 380
380 //////////////////////////////////////////////////////////////////////////////// 381 ////////////////////////////////////////////////////////////////////////////////
381 382
382 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) { 383 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) {
383 this->handleDirtyContext(); 384 this->handleDirtyContext();
385 if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*this->c aps())) {
386 this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType);
387 }
388
384 GrVertices::Iterator iter; 389 GrVertices::Iterator iter;
385 const GrNonInstancedVertices* verts = iter.init(vertices); 390 const GrNonInstancedVertices* verts = iter.init(vertices);
386 do { 391 do {
387 this->onDraw(args, *verts); 392 this->onDraw(args, *verts);
388 } while ((verts = iter.next())); 393 } while ((verts = iter.next()));
389 } 394 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrImmediateDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698