OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 // Temporary forwarding header |
6 #ifndef LayerTextureSubImage_h | 6 #include "cc/layer_texture_sub_image.h" |
7 #define LayerTextureSubImage_h | |
8 | |
9 #if USE(ACCELERATED_COMPOSITING) | |
10 | |
11 #include "GraphicsTypes3D.h" | |
12 #include "IntRect.h" | |
13 #include "IntSize.h" | |
14 #include <wtf/OwnArrayPtr.h> | |
15 | |
16 namespace WebKit { | |
17 class WebGraphicsContext3D; | |
18 } | |
19 | |
20 namespace cc { | |
21 | |
22 class LayerTextureSubImage { | |
23 public: | |
24 explicit LayerTextureSubImage(bool useMapSubForUpload); | |
25 ~LayerTextureSubImage(); | |
26 | |
27 void upload(const uint8_t* image, const IntRect& imageRect, | |
28 const IntRect& sourceRect, const IntSize& destOffset, | |
29 GC3Denum format, WebKit::WebGraphicsContext3D*); | |
30 | |
31 private: | |
32 void uploadWithTexSubImage(const uint8_t* image, const IntRect& imageRect, | |
33 const IntRect& sourceRect, const IntSize& destOff
set, | |
34 GC3Denum format, WebKit::WebGraphicsContext3D*); | |
35 void uploadWithMapTexSubImage(const uint8_t* image, const IntRect& imageRect
, | |
36 const IntRect& sourceRect, const IntSize& dest
Offset, | |
37 GC3Denum format, WebKit::WebGraphicsContext3D*
); | |
38 | |
39 bool m_useMapTexSubImage; | |
40 size_t m_subImageSize; | |
41 OwnArrayPtr<uint8_t> m_subImage; | |
42 }; | |
43 | |
44 } // namespace cc | |
45 #endif // USE(ACCELERATED_COMPOSITING) | |
46 #endif // LayerTextureSubImage_h | |
OLD | NEW |