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