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

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

Issue 678683005: Scissor rect on drawinfo (Closed) Base URL: https://skia.googlesource.com/skia.git@clip_to_target
Patch Set: rebase on master 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 | « src/gpu/GrClipMaskManager.cpp ('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 * 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
(...skipping 19 matching lines...) Expand all
30 class GrPathRange; 30 class GrPathRange;
31 class GrVertexBuffer; 31 class GrVertexBuffer;
32 32
33 class GrDrawTarget : public SkRefCnt { 33 class GrDrawTarget : public SkRefCnt {
34 protected: 34 protected:
35 class DrawInfo; 35 class DrawInfo;
36 36
37 public: 37 public:
38 SK_DECLARE_INST_COUNT(GrDrawTarget) 38 SK_DECLARE_INST_COUNT(GrDrawTarget)
39 39
40
41 typedef GrPathRendering::PathTransformType PathTransformType ; 40 typedef GrPathRendering::PathTransformType PathTransformType ;
42 41
43 /////////////////////////////////////////////////////////////////////////// 42 ///////////////////////////////////////////////////////////////////////////
44 43
45 // The context may not be fully constructed and should not be used during Gr DrawTarget 44 // The context may not be fully constructed and should not be used during Gr DrawTarget
46 // construction. 45 // construction.
47 GrDrawTarget(GrContext* context); 46 GrDrawTarget(GrContext* context);
48 virtual ~GrDrawTarget(); 47 virtual ~GrDrawTarget();
49 48
50 /** 49 /**
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 bool isIssued() { return fDrawTarget && fDrawTarget->isIssued(fDrawID); } 685 bool isIssued() { return fDrawTarget && fDrawTarget->isIssued(fDrawID); }
687 686
688 private: 687 private:
689 GrDrawTarget* fDrawTarget; 688 GrDrawTarget* fDrawTarget;
690 uint32_t fDrawID; // this may wrap, but we're doing direct compa rison 689 uint32_t fDrawID; // this may wrap, but we're doing direct compa rison
691 // so that should be okay 690 // so that should be okay
692 }; 691 };
693 692
694 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, 0); } 693 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, 0); }
695 694
695 // The state of the scissor is controlled by the clip manager, no one else s hould set
696 // Scissor state
697 struct ScissorState {
698 ScissorState() : fEnabled(false) {}
699 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; }
700 bool fEnabled;
701 SkIRect fRect;
702 };
703
696 protected: 704 protected:
697 // Extend access to GrDrawState::convertToPEndeingExec to subclasses. 705 // Extend access to GrDrawState::convertToPEndeingExec to subclasses.
698 void convertDrawStateToPendingExec(GrDrawState* ds) { 706 void convertDrawStateToPendingExec(GrDrawState* ds) {
699 ds->convertToPendingExec(); 707 ds->convertToPendingExec();
700 } 708 }
701 709
702 enum GeometrySrcType { 710 enum GeometrySrcType {
703 kNone_GeometrySrcType, //<! src has not been specified 711 kNone_GeometrySrcType, //<! src has not been specified
704 kReserved_GeometrySrcType, //<! src was set using reserve*Space 712 kReserved_GeometrySrcType, //<! src was set using reserve*Space
705 kArray_GeometrySrcType, //<! src was set using set*SourceToArray 713 kArray_GeometrySrcType, //<! src was set using set*SourceToArray
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 GrContext* fContext; 943 GrContext* fContext;
936 // To keep track that we always have at least as many debug marker adds as r emoves 944 // To keep track that we always have at least as many debug marker adds as r emoves
937 int fGpuTraceMar kerCount; 945 int fGpuTraceMar kerCount;
938 GrTraceMarkerSet fActiveTrace Markers; 946 GrTraceMarkerSet fActiveTrace Markers;
939 GrTraceMarkerSet fStoredTrace Markers; 947 GrTraceMarkerSet fStoredTrace Markers;
940 948
941 typedef SkRefCnt INHERITED; 949 typedef SkRefCnt INHERITED;
942 }; 950 };
943 951
944 #endif 952 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698