OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrRenderTarget_DEFINED | 8 #ifndef GrRenderTarget_DEFINED |
9 #define GrRenderTarget_DEFINED | 9 #define GrRenderTarget_DEFINED |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 }; | 102 }; |
103 virtual ResolveType getResolveType() const = 0; | 103 virtual ResolveType getResolveType() const = 0; |
104 | 104 |
105 /** | 105 /** |
106 * GrStencilBuffer is not part of the public API. | 106 * GrStencilBuffer is not part of the public API. |
107 */ | 107 */ |
108 GrStencilBuffer* getStencilBuffer() const { return fStencilBuffer; } | 108 GrStencilBuffer* getStencilBuffer() const { return fStencilBuffer; } |
109 void setStencilBuffer(GrStencilBuffer* stencilBuffer); | 109 void setStencilBuffer(GrStencilBuffer* stencilBuffer); |
110 | 110 |
111 protected: | 111 protected: |
112 GrRenderTarget(GrGpu* gpu, | 112 GrRenderTarget(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc) |
113 bool isWrapped, | 113 : INHERITED(gpu, lifeCycle, desc) |
114 const GrSurfaceDesc& desc) | |
115 : INHERITED(gpu, isWrapped, desc) | |
116 , fStencilBuffer(NULL) { | 114 , fStencilBuffer(NULL) { |
117 fResolveRect.setLargestInverted(); | 115 fResolveRect.setLargestInverted(); |
118 } | 116 } |
119 | 117 |
120 // override of GrResource | 118 // override of GrResource |
121 void onAbandon() SK_OVERRIDE; | 119 void onAbandon() SK_OVERRIDE; |
122 void onRelease() SK_OVERRIDE; | 120 void onRelease() SK_OVERRIDE; |
123 | 121 |
124 private: | 122 private: |
125 GrStencilBuffer* fStencilBuffer; | 123 GrStencilBuffer* fStencilBuffer; |
126 | 124 |
127 SkIRect fResolveRect; | 125 SkIRect fResolveRect; |
128 | 126 |
129 typedef GrSurface INHERITED; | 127 typedef GrSurface INHERITED; |
130 }; | 128 }; |
131 | 129 |
132 #endif | 130 #endif |
OLD | NEW |