OLD | NEW |
1 // Copyright 2012 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 #ifndef CC_TEXTURE_UPLOADER_H_ | 5 #ifndef CC_TEXTURE_UPLOADER_H_ |
6 #define CC_TEXTURE_UPLOADER_H_ | 6 #define CC_TEXTURE_UPLOADER_H_ |
7 | 7 |
8 #include "IntRect.h" | 8 #include "IntRect.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "cc/scoped_ptr_deque.h" | 11 #include "cc/scoped_ptr_deque.h" |
12 #include <deque> | 12 #include <set> |
13 #include "third_party/khronos/GLES2/gl2.h" | 13 #include "third_party/khronos/GLES2/gl2.h" |
14 | 14 |
15 namespace WebKit { | 15 namespace WebKit { |
16 class WebGraphicsContext3D; | 16 class WebGraphicsContext3D; |
17 } | 17 } |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 | 20 |
21 class TextureUploader { | 21 class TextureUploader { |
22 public: | 22 public: |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 GLenum format); | 80 GLenum format); |
81 void uploadWithMapTexSubImage(const uint8_t* image, | 81 void uploadWithMapTexSubImage(const uint8_t* image, |
82 const IntRect& image_rect, | 82 const IntRect& image_rect, |
83 const IntRect& source_rect, | 83 const IntRect& source_rect, |
84 const IntSize& dest_offset, | 84 const IntSize& dest_offset, |
85 GLenum format); | 85 GLenum format); |
86 | 86 |
87 WebKit::WebGraphicsContext3D* m_context; | 87 WebKit::WebGraphicsContext3D* m_context; |
88 ScopedPtrDeque<Query> m_pendingQueries; | 88 ScopedPtrDeque<Query> m_pendingQueries; |
89 ScopedPtrDeque<Query> m_availableQueries; | 89 ScopedPtrDeque<Query> m_availableQueries; |
90 std::deque<double> m_texturesPerSecondHistory; | 90 std::multiset<double> m_texturesPerSecondHistory; |
91 size_t m_numBlockingTextureUploads; | 91 size_t m_numBlockingTextureUploads; |
92 | 92 |
93 bool m_useMapTexSubImage; | 93 bool m_useMapTexSubImage; |
94 size_t m_subImageSize; | 94 size_t m_subImageSize; |
95 scoped_array<uint8_t> m_subImage; | 95 scoped_array<uint8_t> m_subImage; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(TextureUploader); | 97 DISALLOW_COPY_AND_ASSIGN(TextureUploader); |
98 }; | 98 }; |
99 | 99 |
100 } // namespace cc | 100 } // namespace cc |
101 | 101 |
102 #endif // CC_TEXTURE_UPLOADER_H_ | 102 #endif // CC_TEXTURE_UPLOADER_H_ |
OLD | NEW |