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 #include "third_party/khronos/GLES2/gl2.h" |
9 #include "CCPrioritizedTexture.h" | 10 #include "CCPrioritizedTexture.h" |
10 #include "GraphicsTypes3D.h" | |
11 #include <wtf/RefCounted.h> | 11 #include <wtf/RefCounted.h> |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 class IntRect; | 15 class IntRect; |
16 class IntSize; | 16 class IntSize; |
17 class TextureManager; | 17 class TextureManager; |
18 struct CCRenderingStats; | 18 struct CCRenderingStats; |
19 class CCTextureUpdateQueue; | 19 class CCTextureUpdateQueue; |
20 | 20 |
(...skipping 26 matching lines...) Expand all Loading... |
47 enum SampledTexelFormat { | 47 enum SampledTexelFormat { |
48 SampledTexelFormatRGBA, | 48 SampledTexelFormatRGBA, |
49 SampledTexelFormatBGRA, | 49 SampledTexelFormatBGRA, |
50 SampledTexelFormatInvalid, | 50 SampledTexelFormatInvalid, |
51 }; | 51 }; |
52 virtual PassOwnPtr<Texture> createTexture(CCPrioritizedTextureManager*) = 0; | 52 virtual PassOwnPtr<Texture> createTexture(CCPrioritizedTextureManager*) = 0; |
53 // Returns the format of the texel uploaded by this interface. | 53 // Returns the format of the texel uploaded by this interface. |
54 // This format should not be confused by texture internal format. | 54 // This format should not be confused by texture internal format. |
55 // This format specifies the component order in the sampled texel. | 55 // This format specifies the component order in the sampled texel. |
56 // If the format is TexelFormatBGRA, vec4.x is blue and vec4.z is red. | 56 // If the format is TexelFormatBGRA, vec4.x is blue and vec4.z is red. |
57 virtual SampledTexelFormat sampledTexelFormat(GC3Denum textureFormat) = 0; | 57 virtual SampledTexelFormat sampledTexelFormat(GLenum textureFormat) = 0; |
58 // The |resultingOpaqueRect| gives back a region of the layer that was paint
ed opaque. If the layer is marked opaque in the updater, | 58 // The |resultingOpaqueRect| gives back a region of the layer that was paint
ed opaque. If the layer is marked opaque in the updater, |
59 // then this region should be ignored in preference for the entire layer's a
rea. | 59 // then this region should be ignored in preference for the entire layer's a
rea. |
60 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile
Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa
queRect, CCRenderingStats&) { } | 60 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile
Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa
queRect, CCRenderingStats&) { } |
61 | 61 |
62 // Set true by the layer when it is known that the entire output is going to
be opaque. | 62 // Set true by the layer when it is known that the entire output is going to
be opaque. |
63 virtual void setOpaque(bool) { } | 63 virtual void setOpaque(bool) { } |
64 }; | 64 }; |
65 | 65 |
66 } // namespace cc | 66 } // namespace cc |
67 #endif // LayerTextureUpdater_h | 67 #endif // LayerTextureUpdater_h |
OLD | NEW |