OLD | NEW |
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 GrRenderTargetContextPriv_DEFINED | 8 #ifndef GrRenderTargetContextPriv_DEFINED |
9 #define GrRenderTargetContextPriv_DEFINED | 9 #define GrRenderTargetContextPriv_DEFINED |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 const SkMatrix& viewMatrix, | 78 const SkMatrix& viewMatrix, |
79 const SkPath&); | 79 const SkPath&); |
80 | 80 |
81 SkBudgeted isBudgeted() const; | 81 SkBudgeted isBudgeted() const; |
82 | 82 |
83 void testingOnly_drawBatch(const GrPaint&, | 83 void testingOnly_drawBatch(const GrPaint&, |
84 GrDrawBatch* batch, | 84 GrDrawBatch* batch, |
85 const GrUserStencilSettings* = nullptr, | 85 const GrUserStencilSettings* = nullptr, |
86 bool snapToCenters = false); | 86 bool snapToCenters = false); |
87 | 87 |
| 88 GrContext* context() { return fRenderTargetContext->fContext; } |
| 89 |
| 90 GrRenderTargetProxy* accessRTP() { return fRenderTargetContext->fRenderTarge
tProxy.get(); } |
| 91 |
88 private: | 92 private: |
89 explicit GrRenderTargetContextPriv(GrRenderTargetContext* renderTargetContex
t) | 93 explicit GrRenderTargetContextPriv(GrRenderTargetContext* renderTargetContex
t) |
90 : fRenderTargetContext(renderTargetContext) {} | 94 : fRenderTargetContext(renderTargetContext) {} |
91 GrRenderTargetContextPriv(const GrRenderTargetPriv&) {} // unimpl | 95 GrRenderTargetContextPriv(const GrRenderTargetPriv&) {} // unimpl |
92 GrRenderTargetContextPriv& operator=(const GrRenderTargetPriv&); // unimpl | 96 GrRenderTargetContextPriv& operator=(const GrRenderTargetPriv&); // unimpl |
93 | 97 |
94 // No taking addresses of this type. | 98 // No taking addresses of this type. |
95 const GrRenderTargetContextPriv* operator&() const; | 99 const GrRenderTargetContextPriv* operator&() const; |
96 GrRenderTargetContextPriv* operator&(); | 100 GrRenderTargetContextPriv* operator&(); |
97 | 101 |
98 GrRenderTargetContext* fRenderTargetContext; | 102 GrRenderTargetContext* fRenderTargetContext; |
99 | 103 |
100 friend class GrRenderTargetContext; // to construct/copy this type. | 104 friend class GrRenderTargetContext; // to construct/copy this type. |
101 }; | 105 }; |
102 | 106 |
103 inline GrRenderTargetContextPriv GrRenderTargetContext::priv() { | 107 inline GrRenderTargetContextPriv GrRenderTargetContext::priv() { |
104 return GrRenderTargetContextPriv(this); | 108 return GrRenderTargetContextPriv(this); |
105 } | 109 } |
106 | 110 |
107 inline const GrRenderTargetContextPriv GrRenderTargetContext::priv() const { | 111 inline const GrRenderTargetContextPriv GrRenderTargetContext::priv() const { |
108 return GrRenderTargetContextPriv(const_cast<GrRenderTargetContext*>(this)); | 112 return GrRenderTargetContextPriv(const_cast<GrRenderTargetContext*>(this)); |
109 } | 113 } |
110 | 114 |
111 #endif | 115 #endif |
OLD | NEW |