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

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

Issue 1124733004: Move DrawInfo out from GrDrawTarget and rename to GrVertices. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment changes 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/GrDrawTarget.h ('k') | src/gpu/GrGpu.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 #include "GrDrawTarget.h" 9 #include "GrDrawTarget.h"
10 10
11 #include "GrBatch.h" 11 #include "GrBatch.h"
12 #include "GrBufferAllocPool.h" 12 #include "GrBufferAllocPool.h"
13 #include "GrContext.h" 13 #include "GrContext.h"
14 #include "GrDrawTargetCaps.h" 14 #include "GrDrawTargetCaps.h"
15 #include "GrPath.h" 15 #include "GrPath.h"
16 #include "GrPipeline.h" 16 #include "GrPipeline.h"
17 #include "GrMemoryPool.h" 17 #include "GrMemoryPool.h"
18 #include "GrRenderTarget.h" 18 #include "GrRenderTarget.h"
19 #include "GrRenderTargetPriv.h" 19 #include "GrRenderTargetPriv.h"
20 #include "GrSurfacePriv.h" 20 #include "GrSurfacePriv.h"
21 #include "GrTemplates.h" 21 #include "GrTemplates.h"
22 #include "GrTexture.h" 22 #include "GrTexture.h"
23 #include "GrVertexBuffer.h" 23 #include "GrVertexBuffer.h"
24 24
25 #include "SkStrokeRec.h" 25 #include "SkStrokeRec.h"
26 26
27 //////////////////////////////////////////////////////////////////////////////// 27 ////////////////////////////////////////////////////////////////////////////////
28 28
29 GrDrawTarget::DrawInfo& GrDrawTarget::DrawInfo::operator =(const DrawInfo& di) {
30 fPrimitiveType = di.fPrimitiveType;
31 fStartVertex = di.fStartVertex;
32 fStartIndex = di.fStartIndex;
33 fVertexCount = di.fVertexCount;
34 fIndexCount = di.fIndexCount;
35
36 fInstanceCount = di.fInstanceCount;
37 fVerticesPerInstance = di.fVerticesPerInstance;
38 fIndicesPerInstance = di.fIndicesPerInstance;
39
40 fVertexBuffer.reset(di.vertexBuffer());
41 fIndexBuffer.reset(di.indexBuffer());
42
43 return *this;
44 }
45
46 ////////////////////////////////////////////////////////////////////////////////
47
48 #define DEBUG_INVAL_BUFFER 0xdeadcafe 29 #define DEBUG_INVAL_BUFFER 0xdeadcafe
49 #define DEBUG_INVAL_START_IDX -1 30 #define DEBUG_INVAL_START_IDX -1
50 31
51 GrDrawTarget::GrDrawTarget(GrContext* context, 32 GrDrawTarget::GrDrawTarget(GrContext* context,
52 GrVertexBufferAllocPool* vpool, 33 GrVertexBufferAllocPool* vpool,
53 GrIndexBufferAllocPool* ipool) 34 GrIndexBufferAllocPool* ipool)
54 : fContext(context) 35 : fContext(context)
55 , fCaps(SkRef(context->getGpu()->caps())) 36 , fCaps(SkRef(context->getGpu()->caps()))
56 , fGpuTraceMarkerCount(0) 37 , fGpuTraceMarkerCount(0)
57 , fVertexPool(vpool) 38 , fVertexPool(vpool)
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp, 763 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp,
783 GrPipelineBuilder::AutoRestoreStencil* ars, 764 GrPipelineBuilder::AutoRestoreStencil* ars,
784 GrScissorState* scissorState, 765 GrScissorState* scissorState,
785 const SkRect* devBounds) { 766 const SkRect* devBounds) {
786 return fClipMaskManager.setupClipping(pipelineBuilder, 767 return fClipMaskManager.setupClipping(pipelineBuilder,
787 arfp, 768 arfp,
788 ars, 769 ars,
789 scissorState, 770 scissorState,
790 devBounds); 771 devBounds);
791 } 772 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698