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 | 8 |
9 #ifndef GrGLRenderTarget_DEFINED | 9 #ifndef GrGLRenderTarget_DEFINED |
10 #define GrGLRenderTarget_DEFINED | 10 #define GrGLRenderTarget_DEFINED |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 fRTFBOID == fTexFBOID) { | 47 fRTFBOID == fTexFBOID) { |
48 // catches FBO 0 and non MSAA case | 48 // catches FBO 0 and non MSAA case |
49 return kAutoResolves_ResolveType; | 49 return kAutoResolves_ResolveType; |
50 } else if (kUnresolvableFBOID == fTexFBOID) { | 50 } else if (kUnresolvableFBOID == fTexFBOID) { |
51 return kCantResolve_ResolveType; | 51 return kCantResolve_ResolveType; |
52 } else { | 52 } else { |
53 return kCanResolve_ResolveType; | 53 return kCanResolve_ResolveType; |
54 } | 54 } |
55 } | 55 } |
56 | 56 |
| 57 /** When we don't own the FBO ID we don't attempt to modify its attachments.
*/ |
| 58 bool canAttemptStencilAttachment() const SK_OVERRIDE { return !fIsWrapped; } |
| 59 |
57 protected: | 60 protected: |
58 // The public constructor registers this object with the cache. However, onl
y the most derived | 61 // The public constructor registers this object with the cache. However, onl
y the most derived |
59 // class should register with the cache. This constructor does not do the re
gistration and | 62 // class should register with the cache. This constructor does not do the re
gistration and |
60 // rather moves that burden onto the derived class. | 63 // rather moves that burden onto the derived class. |
61 enum Derived { kDerived }; | 64 enum Derived { kDerived }; |
62 GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived); | 65 GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived); |
63 | 66 |
64 void init(const GrSurfaceDesc&, const IDDesc&); | 67 void init(const GrSurfaceDesc&, const IDDesc&); |
65 | 68 |
66 void onAbandon() SK_OVERRIDE; | 69 void onAbandon() SK_OVERRIDE; |
(...skipping 18 matching lines...) Expand all Loading... |
85 | 88 |
86 // onGpuMemorySize() needs to know what how many color values are owned per
pixel. However, | 89 // onGpuMemorySize() needs to know what how many color values are owned per
pixel. However, |
87 // abandon and release zero out the IDs and the cache needs to know the size
even after those | 90 // abandon and release zero out the IDs and the cache needs to know the size
even after those |
88 // actions. | 91 // actions. |
89 uint8_t fColorValuesPerPixel; | 92 uint8_t fColorValuesPerPixel; |
90 | 93 |
91 typedef GrRenderTarget INHERITED; | 94 typedef GrRenderTarget INHERITED; |
92 }; | 95 }; |
93 | 96 |
94 #endif | 97 #endif |
OLD | NEW |