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

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

Issue 2123693002: Revert of Begin instanced rendering for simple shapes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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.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 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 #include "GrDrawTarget.h"
13 #include "GrPathRendering.h" 12 #include "GrPathRendering.h"
14 13
15 class GrFixedClip; 14 class GrFixedClip;
16 class GrPath; 15 class GrPath;
17 struct GrUserStencilSettings; 16 struct GrUserStencilSettings;
18 17
19 /** Class that adds methods to GrDrawContext that are only intended for use inte rnal to Skia. 18 /** Class that adds methods to GrDrawContext that are only intended for use inte rnal to Skia.
20 This class is purely a privileged window into GrDrawContext. It should never have additional 19 This class is purely a privileged window into GrDrawContext. It should never have additional
21 data members or virtual methods. */ 20 data members or virtual methods. */
22 class GrDrawContextPriv { 21 class GrDrawContextPriv {
23 public: 22 public:
24 gr_instanced::InstancedRendering* accessInstancedRendering() const {
25 return fDrawContext->getDrawTarget()->instancedRendering();
26 }
27
28 void clearStencilClip(const SkIRect& rect, bool insideClip); 23 void clearStencilClip(const SkIRect& rect, bool insideClip);
29 24
30 void stencilRect(const GrFixedClip& clip, 25 void stencilRect(const GrFixedClip& clip,
31 const GrUserStencilSettings* ss, 26 const GrUserStencilSettings* ss,
32 bool useHWAA, 27 bool useHWAA,
33 const SkMatrix& viewMatrix, 28 const SkMatrix& viewMatrix,
34 const SkRect& rect); 29 const SkRect& rect);
35 30
36 void stencilPath(const GrPipelineBuilder&, 31 void stencilPath(const GrPipelineBuilder&,
37 const GrClip&, 32 const GrClip&,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 friend class GrDrawContext; // to construct/copy this type. 69 friend class GrDrawContext; // to construct/copy this type.
75 }; 70 };
76 71
77 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext Priv(this); } 72 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext Priv(this); }
78 73
79 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const { 74 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const {
80 return GrDrawContextPriv(const_cast<GrDrawContext*>(this)); 75 return GrDrawContextPriv(const_cast<GrDrawContext*>(this));
81 } 76 }
82 77
83 #endif 78 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698