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

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

Issue 737723003: drawinfo carries bufferinfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | src/gpu/GrDrawTarget.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 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrDrawTarget_DEFINED 8 #ifndef GrDrawTarget_DEFINED
9 #define GrDrawTarget_DEFINED 9 #define GrDrawTarget_DEFINED
10 10
11 #include "GrClipData.h" 11 #include "GrClipData.h"
12 #include "GrClipMaskManager.h" 12 #include "GrClipMaskManager.h"
13 #include "GrContext.h" 13 #include "GrContext.h"
14 #include "GrDrawState.h" 14 #include "GrDrawState.h"
15 #include "GrIndexBuffer.h" 15 #include "GrIndexBuffer.h"
16 #include "GrPathRendering.h" 16 #include "GrPathRendering.h"
17 #include "GrTraceMarker.h" 17 #include "GrTraceMarker.h"
18 #include "GrVertexBuffer.h"
18 19
19 #include "SkClipStack.h" 20 #include "SkClipStack.h"
20 #include "SkMatrix.h" 21 #include "SkMatrix.h"
21 #include "SkPath.h" 22 #include "SkPath.h"
22 #include "SkStrokeRec.h" 23 #include "SkStrokeRec.h"
23 #include "SkTArray.h" 24 #include "SkTArray.h"
24 #include "SkTLazy.h" 25 #include "SkTLazy.h"
25 #include "SkTypes.h" 26 #include "SkTypes.h"
26 #include "SkXfermode.h" 27 #include "SkXfermode.h"
27 28
28 class GrClipData; 29 class GrClipData;
29 class GrDrawTargetCaps; 30 class GrDrawTargetCaps;
30 class GrPath; 31 class GrPath;
31 class GrPathRange; 32 class GrPathRange;
32 class GrVertexBuffer;
33 33
34 class GrDrawTarget : public SkRefCnt { 34 class GrDrawTarget : public SkRefCnt {
35 public: 35 public:
36 SK_DECLARE_INST_COUNT(GrDrawTarget) 36 SK_DECLARE_INST_COUNT(GrDrawTarget)
37 37
38 typedef GrPathRendering::PathTransformType PathTransformType ; 38 typedef GrPathRendering::PathTransformType PathTransformType ;
39 39
40 /////////////////////////////////////////////////////////////////////////// 40 ///////////////////////////////////////////////////////////////////////////
41 41
42 // The context may not be fully constructed and should not be used during Gr DrawTarget 42 // The context may not be fully constructed and should not be used during Gr DrawTarget
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 void adjustInstanceCount(int instanceOffset); 552 void adjustInstanceCount(int instanceOffset);
553 // shifts the start vertex 553 // shifts the start vertex
554 void adjustStartVertex(int vertexOffset); 554 void adjustStartVertex(int vertexOffset);
555 // shifts the start index 555 // shifts the start index
556 void adjustStartIndex(int indexOffset); 556 void adjustStartIndex(int indexOffset);
557 557
558 void setDevBounds(const SkRect& bounds) { 558 void setDevBounds(const SkRect& bounds) {
559 fDevBoundsStorage = bounds; 559 fDevBoundsStorage = bounds;
560 fDevBounds = &fDevBoundsStorage; 560 fDevBounds = &fDevBoundsStorage;
561 } 561 }
562 const GrVertexBuffer* vertexBuffer() const { return fVertexBuffer; }
563 const GrIndexBuffer* indexBuffer() const { return fIndexBuffer; }
564 void setVertexBuffer(const GrVertexBuffer* vb) { fVertexBuffer = vb; }
bsalomon 2014/11/18 18:41:24 This has to be ref'ed, right?
565 void setIndexBuffer(const GrIndexBuffer* ib) { fIndexBuffer = ib; }
562 const SkRect* getDevBounds() const { return fDevBounds; } 566 const SkRect* getDevBounds() const { return fDevBounds; }
563 567
564 // NULL if no copy of the dst is needed for the draw. 568 // NULL if no copy of the dst is needed for the draw.
565 const GrDeviceCoordTexture* getDstCopy() const { 569 const GrDeviceCoordTexture* getDstCopy() const {
566 if (fDstCopy.texture()) { 570 if (fDstCopy.texture()) {
567 return &fDstCopy; 571 return &fDstCopy;
568 } else { 572 } else {
569 return NULL; 573 return NULL;
570 } 574 }
571 } 575 }
(...skipping 10 matching lines...) Expand all
582 int fVertexCount; 586 int fVertexCount;
583 int fIndexCount; 587 int fIndexCount;
584 588
585 int fInstanceCount; 589 int fInstanceCount;
586 int fVerticesPerInstance; 590 int fVerticesPerInstance;
587 int fIndicesPerInstance; 591 int fIndicesPerInstance;
588 592
589 SkRect fDevBoundsStorage; 593 SkRect fDevBoundsStorage;
590 SkRect* fDevBounds; 594 SkRect* fDevBounds;
591 595
596 const GrVertexBuffer* fVertexBuffer;
597 const GrIndexBuffer* fIndexBuffer;
598
592 GrDeviceCoordTexture fDstCopy; 599 GrDeviceCoordTexture fDstCopy;
593 }; 600 };
594 601
595 bool programUnitTest(int maxStages); 602 bool programUnitTest(int maxStages);
596 603
597 protected: 604 protected:
598 // Extend access to GrDrawState::convertToPEndeingExec to subclasses. 605 // Extend access to GrDrawState::convertToPEndeingExec to subclasses.
599 void convertDrawStateToPendingExec(GrDrawState* ds) { 606 void convertDrawStateToPendingExec(GrDrawState* ds) {
600 ds->convertToPendingExec(); 607 ds->convertToPendingExec();
601 } 608 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 virtual bool setupClip(const SkRect* devBounds, 816 virtual bool setupClip(const SkRect* devBounds,
810 GrDrawState::AutoRestoreEffects* are, 817 GrDrawState::AutoRestoreEffects* are,
811 GrDrawState::AutoRestoreStencil* ars, 818 GrDrawState::AutoRestoreStencil* ars,
812 GrDrawState*, 819 GrDrawState*,
813 GrClipMaskManager::ScissorState* scissorState) SK_OVE RRIDE; 820 GrClipMaskManager::ScissorState* scissorState) SK_OVE RRIDE;
814 821
815 typedef GrDrawTarget INHERITED; 822 typedef GrDrawTarget INHERITED;
816 }; 823 };
817 824
818 #endif 825 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698