OLD | NEW |
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...) Loading... |
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 } |
OLD | NEW |