OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrRenderTargetPriv_DEFINED | 8 #ifndef GrRenderTargetPriv_DEFINED |
9 #define GrRenderTargetPriv_DEFINED | 9 #define GrRenderTargetPriv_DEFINED |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 */ | 23 */ |
24 GrStencilAttachment* getStencilAttachment() const { return fRenderTarget->fS
tencilAttachment; } | 24 GrStencilAttachment* getStencilAttachment() const { return fRenderTarget->fS
tencilAttachment; } |
25 | 25 |
26 /** | 26 /** |
27 * Attaches the GrStencilAttachment onto the render target. If stencil is a
nullptr then the | 27 * Attaches the GrStencilAttachment onto the render target. If stencil is a
nullptr then the |
28 * currently attached GrStencilAttachment will be removed if one was previou
sly attached. This | 28 * currently attached GrStencilAttachment will be removed if one was previou
sly attached. This |
29 * function returns false if there were any failure in attaching the GrStenc
ilAttachment. | 29 * function returns false if there were any failure in attaching the GrStenc
ilAttachment. |
30 */ | 30 */ |
31 bool attachStencilAttachment(GrStencilAttachment* stencil); | 31 bool attachStencilAttachment(GrStencilAttachment* stencil); |
32 | 32 |
| 33 int numStencilBits() const; |
| 34 |
33 const GrGpu::MultisampleSpecs& getMultisampleSpecs(const GrStencilSettings&
stencil) const; | 35 const GrGpu::MultisampleSpecs& getMultisampleSpecs(const GrStencilSettings&
stencil) const; |
34 | 36 |
35 GrRenderTarget::SampleConfig sampleConfig() const { return fRenderTarget->fS
ampleConfig; } | 37 GrRenderTarget::SampleConfig sampleConfig() const { return fRenderTarget->fS
ampleConfig; } |
36 | 38 |
37 private: | 39 private: |
38 explicit GrRenderTargetPriv(GrRenderTarget* renderTarget) : fRenderTarget(re
nderTarget) {} | 40 explicit GrRenderTargetPriv(GrRenderTarget* renderTarget) : fRenderTarget(re
nderTarget) {} |
39 GrRenderTargetPriv(const GrRenderTargetPriv&) {} // unimpl | 41 GrRenderTargetPriv(const GrRenderTargetPriv&) {} // unimpl |
40 GrRenderTargetPriv& operator=(const GrRenderTargetPriv&); // unimpl | 42 GrRenderTargetPriv& operator=(const GrRenderTargetPriv&); // unimpl |
41 | 43 |
42 // No taking addresses of this type. | 44 // No taking addresses of this type. |
43 const GrRenderTargetPriv* operator&() const; | 45 const GrRenderTargetPriv* operator&() const; |
44 GrRenderTargetPriv* operator&(); | 46 GrRenderTargetPriv* operator&(); |
45 | 47 |
46 GrRenderTarget* fRenderTarget; | 48 GrRenderTarget* fRenderTarget; |
47 | 49 |
48 friend class GrRenderTarget; // to construct/copy this type. | 50 friend class GrRenderTarget; // to construct/copy this type. |
49 }; | 51 }; |
50 | 52 |
51 inline GrRenderTargetPriv GrRenderTarget::renderTargetPriv() { return GrRenderTa
rgetPriv(this); } | 53 inline GrRenderTargetPriv GrRenderTarget::renderTargetPriv() { return GrRenderTa
rgetPriv(this); } |
52 | 54 |
53 inline const GrRenderTargetPriv GrRenderTarget::renderTargetPriv () const { | 55 inline const GrRenderTargetPriv GrRenderTarget::renderTargetPriv () const { |
54 return GrRenderTargetPriv(const_cast<GrRenderTarget*>(this)); | 56 return GrRenderTargetPriv(const_cast<GrRenderTarget*>(this)); |
55 } | 57 } |
56 | 58 |
57 #endif | 59 #endif |
OLD | NEW |