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

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

Issue 1971343002: Convert GrClip to an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_clipout
Patch Set: fix crash Created 4 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/GrDrawContext.cpp ('k') | 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 2016 Google Inc. 2 * Copyright 2016 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 GrDrawContextPriv_DEFINED 8 #ifndef GrDrawContextPriv_DEFINED
9 #define GrDrawContextPriv_DEFINED 9 #define GrDrawContextPriv_DEFINED
10 10
11 #include "GrDrawContext.h" 11 #include "GrDrawContext.h"
12 12
13 class GrFixedClip;
13 struct GrUserStencilSettings; 14 struct GrUserStencilSettings;
14 15
15 /** Class that adds methods to GrDrawContext that are only intended for use inte rnal to Skia. 16 /** Class that adds methods to GrDrawContext that are only intended for use inte rnal to Skia.
16 This class is purely a privileged window into GrDrawContext. It should never have additional 17 This class is purely a privileged window into GrDrawContext. It should never have additional
17 data members or virtual methods. */ 18 data members or virtual methods. */
18 class GrDrawContextPriv { 19 class GrDrawContextPriv {
19 public: 20 public:
20 bool drawAndStencilRect(const GrClip&, 21 bool drawAndStencilRect(const GrFixedClip&,
21 const GrUserStencilSettings*, 22 const GrUserStencilSettings*,
22 SkRegion::Op op, 23 SkRegion::Op op,
23 bool invert, 24 bool invert,
24 bool doAA, 25 bool doAA,
25 const SkMatrix& viewMatrix, 26 const SkMatrix& viewMatrix,
26 const SkRect&); 27 const SkRect&);
27 28
28 bool drawAndStencilPath(const GrClip&, 29 bool drawAndStencilPath(const GrFixedClip&,
29 const GrUserStencilSettings*, 30 const GrUserStencilSettings*,
30 SkRegion::Op op, 31 SkRegion::Op op,
31 bool invert, 32 bool invert,
32 bool doAA, 33 bool doAA,
33 const SkMatrix& viewMatrix, 34 const SkMatrix& viewMatrix,
34 const SkPath&); 35 const SkPath&);
35 36
36 void testingOnly_drawBatch(const GrPipelineBuilder& pipelineBuilder, 37 void testingOnly_drawBatch(const GrPipelineBuilder& pipelineBuilder,
37 GrDrawBatch* batch, 38 GrDrawBatch* batch,
38 const GrClip* = nullptr); 39 const GrClip* = nullptr);
(...skipping 12 matching lines...) Expand all
51 friend class GrDrawContext; // to construct/copy this type. 52 friend class GrDrawContext; // to construct/copy this type.
52 }; 53 };
53 54
54 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext Priv(this); } 55 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext Priv(this); }
55 56
56 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const { 57 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const {
57 return GrDrawContextPriv(const_cast<GrDrawContext*>(this)); 58 return GrDrawContextPriv(const_cast<GrDrawContext*>(this));
58 } 59 }
59 60
60 #endif 61 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698