OLD | NEW |
---|---|
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 #ifndef LayerTextureUpdater_h | 6 #ifndef LayerTextureUpdater_h |
7 #define LayerTextureUpdater_h | 7 #define LayerTextureUpdater_h |
8 | 8 |
9 #if USE(ACCELERATED_COMPOSITING) | 9 #if USE(ACCELERATED_COMPOSITING) |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 virtual PassOwnPtr<Texture> createTexture(CCPrioritizedTextureManager*) = 0; | 53 virtual PassOwnPtr<Texture> createTexture(CCPrioritizedTextureManager*) = 0; |
54 // Returns the format of the texel uploaded by this interface. | 54 // Returns the format of the texel uploaded by this interface. |
55 // This format should not be confused by texture internal format. | 55 // This format should not be confused by texture internal format. |
56 // This format specifies the component order in the sampled texel. | 56 // This format specifies the component order in the sampled texel. |
57 // If the format is TexelFormatBGRA, vec4.x is blue and vec4.z is red. | 57 // If the format is TexelFormatBGRA, vec4.x is blue and vec4.z is red. |
58 virtual SampledTexelFormat sampledTexelFormat(GC3Denum textureFormat) = 0; | 58 virtual SampledTexelFormat sampledTexelFormat(GC3Denum textureFormat) = 0; |
59 // The |resultingOpaqueRect| gives back a region of the layer that was paint ed opaque. If the layer is marked opaque in the updater, | 59 // The |resultingOpaqueRect| gives back a region of the layer that was paint ed opaque. If the layer is marked opaque in the updater, |
60 // then this region should be ignored in preference for the entire layer's a rea. | 60 // then this region should be ignored in preference for the entire layer's a rea. |
61 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa queRect, CCRenderingStats&) { } | 61 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa queRect, CCRenderingStats&) { } |
62 | 62 |
63 // Use after prepareToUpdate, allows checking if the texture contents will c hange, to avoid unecessary uploads. | |
64 virtual bool pixelsDidChange() const; | |
jamesr
2012/10/03 19:28:02
this is unnecessary. Keep the more specific type
enne (OOO)
2012/10/03 19:31:43
Please don't do this.
updatePart is a non-virtual
wjmaclean
2012/10/03 20:14:30
Done.
NP, I just wasn't sure if you'd want me to
wjmaclean
2012/10/03 20:14:30
Done.
| |
65 | |
63 // Set true by the layer when it is known that the entire output is going to be opaque. | 66 // Set true by the layer when it is known that the entire output is going to be opaque. |
64 virtual void setOpaque(bool) { } | 67 virtual void setOpaque(bool) { } |
65 }; | 68 }; |
66 | 69 |
67 } // namespace cc | 70 } // namespace cc |
68 #endif // USE(ACCELERATED_COMPOSITING) | 71 #endif // USE(ACCELERATED_COMPOSITING) |
69 #endif // LayerTextureUpdater_h | 72 #endif // LayerTextureUpdater_h |
OLD | NEW |