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

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

Issue 1122673002: Start on simplifying generateGeometry() overrides (Closed) Base URL: https://skia.googlesource.com/skia.git@ibcache
Patch Set: whitespace, remove debug return 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/GrInOrderDrawBuffer.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 #include "GrDrawTarget.h" 9 #include "GrDrawTarget.h"
10 10
(...skipping 19 matching lines...) Expand all
30 fPrimitiveType = di.fPrimitiveType; 30 fPrimitiveType = di.fPrimitiveType;
31 fStartVertex = di.fStartVertex; 31 fStartVertex = di.fStartVertex;
32 fStartIndex = di.fStartIndex; 32 fStartIndex = di.fStartIndex;
33 fVertexCount = di.fVertexCount; 33 fVertexCount = di.fVertexCount;
34 fIndexCount = di.fIndexCount; 34 fIndexCount = di.fIndexCount;
35 35
36 fInstanceCount = di.fInstanceCount; 36 fInstanceCount = di.fInstanceCount;
37 fVerticesPerInstance = di.fVerticesPerInstance; 37 fVerticesPerInstance = di.fVerticesPerInstance;
38 fIndicesPerInstance = di.fIndicesPerInstance; 38 fIndicesPerInstance = di.fIndicesPerInstance;
39 39
40 if (di.fDevBounds) { 40 fVertexBuffer.reset(di.vertexBuffer());
41 SkASSERT(di.fDevBounds == &di.fDevBoundsStorage); 41 fIndexBuffer.reset(di.indexBuffer());
42 fDevBoundsStorage = di.fDevBoundsStorage;
43 fDevBounds = &fDevBoundsStorage;
44 } else {
45 fDevBounds = NULL;
46 }
47
48 this->setVertexBuffer(di.vertexBuffer());
49 this->setIndexBuffer(di.indexBuffer());
50 42
51 return *this; 43 return *this;
52 } 44 }
53 45
54 //////////////////////////////////////////////////////////////////////////////// 46 ////////////////////////////////////////////////////////////////////////////////
55 47
56 #define DEBUG_INVAL_BUFFER 0xdeadcafe 48 #define DEBUG_INVAL_BUFFER 0xdeadcafe
57 #define DEBUG_INVAL_START_IDX -1 49 #define DEBUG_INVAL_START_IDX -1
58 50
59 GrDrawTarget::GrDrawTarget(GrContext* context, 51 GrDrawTarget::GrDrawTarget(GrContext* context,
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp, 782 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp,
791 GrPipelineBuilder::AutoRestoreStencil* ars, 783 GrPipelineBuilder::AutoRestoreStencil* ars,
792 GrScissorState* scissorState, 784 GrScissorState* scissorState,
793 const SkRect* devBounds) { 785 const SkRect* devBounds) {
794 return fClipMaskManager.setupClipping(pipelineBuilder, 786 return fClipMaskManager.setupClipping(pipelineBuilder,
795 arfp, 787 arfp,
796 ars, 788 ars,
797 scissorState, 789 scissorState,
798 devBounds); 790 devBounds);
799 } 791 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698