| 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 <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // image be a buffer for imageRect. This function will copy the region | 46 // image be a buffer for imageRect. This function will copy the region |
| 47 // corresponding to sourceRect to destOffset in this sub-image. | 47 // corresponding to sourceRect to destOffset in this sub-image. |
| 48 void upload(const uint8* image, | 48 void upload(const uint8* image, |
| 49 const gfx::Rect& content_rect, | 49 const gfx::Rect& content_rect, |
| 50 const gfx::Rect& source_rect, | 50 const gfx::Rect& source_rect, |
| 51 const gfx::Vector2d& dest_offset, | 51 const gfx::Vector2d& dest_offset, |
| 52 GLenum format, | 52 GLenum format, |
| 53 const gfx::Size& size); | 53 const gfx::Size& size); |
| 54 | 54 |
| 55 void flush(); | 55 void flush(); |
| 56 void releaseCachedQueries(); |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 class Query { | 59 class Query { |
| 59 public: | 60 public: |
| 60 static scoped_ptr<Query> create(WebKit::WebGraphicsContext3D* context) {
return make_scoped_ptr(new Query(context)); } | 61 static scoped_ptr<Query> create(WebKit::WebGraphicsContext3D* context) {
return make_scoped_ptr(new Query(context)); } |
| 61 | 62 |
| 62 virtual ~Query(); | 63 virtual ~Query(); |
| 63 | 64 |
| 64 void begin(); | 65 void begin(); |
| 65 void end(); | 66 void end(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 111 |
| 111 bool m_useShallowFlush; | 112 bool m_useShallowFlush; |
| 112 size_t m_numTextureUploadsSinceLastFlush; | 113 size_t m_numTextureUploadsSinceLastFlush; |
| 113 | 114 |
| 114 DISALLOW_COPY_AND_ASSIGN(TextureUploader); | 115 DISALLOW_COPY_AND_ASSIGN(TextureUploader); |
| 115 }; | 116 }; |
| 116 | 117 |
| 117 } // namespace cc | 118 } // namespace cc |
| 118 | 119 |
| 119 #endif // CC_TEXTURE_UPLOADER_H_ | 120 #endif // CC_TEXTURE_UPLOADER_H_ |
| OLD | NEW |