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 GrDrawContextPriv_DEFINED | 8 #ifndef GrDrawContextPriv_DEFINED |
9 #define GrDrawContextPriv_DEFINED | 9 #define GrDrawContextPriv_DEFINED |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 private: | 39 private: |
40 explicit GrDrawContextPriv(GrDrawContext* drawContext) : fDrawContext(drawCo
ntext) {} | 40 explicit GrDrawContextPriv(GrDrawContext* drawContext) : fDrawContext(drawCo
ntext) {} |
41 GrDrawContextPriv(const GrRenderTargetPriv&) {} // unimpl | 41 GrDrawContextPriv(const GrRenderTargetPriv&) {} // unimpl |
42 GrDrawContextPriv& operator=(const GrRenderTargetPriv&); // unimpl | 42 GrDrawContextPriv& operator=(const GrRenderTargetPriv&); // unimpl |
43 | 43 |
44 // No taking addresses of this type. | 44 // No taking addresses of this type. |
45 const GrDrawContextPriv* operator&() const; | 45 const GrDrawContextPriv* operator&() const; |
46 GrDrawContextPriv* operator&(); | 46 GrDrawContextPriv* operator&(); |
47 | 47 |
48 GrDrawContext* fDrawContext; | 48 GrDrawContext* fDrawContext; |
49 | 49 |
50 friend class GrDrawContext; // to construct/copy this type. | 50 friend class GrDrawContext; // to construct/copy this type. |
51 }; | 51 }; |
52 | 52 |
53 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext
Priv(this); } | 53 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext
Priv(this); } |
54 | 54 |
55 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const { | 55 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const { |
56 return GrDrawContextPriv(const_cast<GrDrawContext*>(this)); | 56 return GrDrawContextPriv(const_cast<GrDrawContext*>(this)); |
57 } | 57 } |
58 | 58 |
59 #endif | 59 #endif |
60 | |
OLD | NEW |