| 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_SCHEDULER_TEXTURE_UPLOADER_H_ | 5 #ifndef CC_SCHEDULER_TEXTURE_UPLOADER_H_ |
| 6 #define CC_SCHEDULER_TEXTURE_UPLOADER_H_ | 6 #define CC_SCHEDULER_TEXTURE_UPLOADER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 void UploadWithTexSubImage(const uint8* image, | 96 void UploadWithTexSubImage(const uint8* image, |
| 97 gfx::Rect image_rect, | 97 gfx::Rect image_rect, |
| 98 gfx::Rect source_rect, | 98 gfx::Rect source_rect, |
| 99 gfx::Vector2d dest_offset, | 99 gfx::Vector2d dest_offset, |
| 100 ResourceFormat format); | 100 ResourceFormat format); |
| 101 void UploadWithMapTexSubImage(const uint8* image, | 101 void UploadWithMapTexSubImage(const uint8* image, |
| 102 gfx::Rect image_rect, | 102 gfx::Rect image_rect, |
| 103 gfx::Rect source_rect, | 103 gfx::Rect source_rect, |
| 104 gfx::Vector2d dest_offset, | 104 gfx::Vector2d dest_offset, |
| 105 ResourceFormat format); | 105 ResourceFormat format); |
| 106 void UploadWithTexImageETC1(const uint8* image, gfx::Size size); |
| 106 | 107 |
| 107 WebKit::WebGraphicsContext3D* context_; | 108 WebKit::WebGraphicsContext3D* context_; |
| 108 ScopedPtrDeque<Query> pending_queries_; | 109 ScopedPtrDeque<Query> pending_queries_; |
| 109 ScopedPtrDeque<Query> available_queries_; | 110 ScopedPtrDeque<Query> available_queries_; |
| 110 std::multiset<double> textures_per_second_history_; | 111 std::multiset<double> textures_per_second_history_; |
| 111 size_t num_blocking_texture_uploads_; | 112 size_t num_blocking_texture_uploads_; |
| 112 | 113 |
| 113 bool use_map_tex_sub_image_; | 114 bool use_map_tex_sub_image_; |
| 114 size_t sub_image_size_; | 115 size_t sub_image_size_; |
| 115 scoped_ptr<uint8[]> sub_image_; | 116 scoped_ptr<uint8[]> sub_image_; |
| 116 | 117 |
| 117 bool use_shallow_flush_; | 118 bool use_shallow_flush_; |
| 118 size_t num_texture_uploads_since_last_flush_; | 119 size_t num_texture_uploads_since_last_flush_; |
| 119 | 120 |
| 120 DISALLOW_COPY_AND_ASSIGN(TextureUploader); | 121 DISALLOW_COPY_AND_ASSIGN(TextureUploader); |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 } // namespace cc | 124 } // namespace cc |
| 124 | 125 |
| 125 #endif // CC_SCHEDULER_TEXTURE_UPLOADER_H_ | 126 #endif // CC_SCHEDULER_TEXTURE_UPLOADER_H_ |
| OLD | NEW |