| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RESOURCES_TEXTURE_UPLOADER_H_ | 5 #ifndef CC_RESOURCES_TEXTURE_UPLOADER_H_ |
| 6 #define CC_RESOURCES_TEXTURE_UPLOADER_H_ | 6 #define CC_RESOURCES_TEXTURE_UPLOADER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "cc/base/cc_export.h" | |
| 13 #include "cc/base/scoped_ptr_deque.h" | 12 #include "cc/base/scoped_ptr_deque.h" |
| 14 #include "cc/resources/resource_provider.h" | 13 #include "cc/resources/resource_provider.h" |
| 15 | 14 |
| 16 namespace gfx { | 15 namespace gfx { |
| 17 class Rect; | 16 class Rect; |
| 18 class Size; | 17 class Size; |
| 19 class Vector2d; | 18 class Vector2d; |
| 20 } | 19 } |
| 21 | 20 |
| 22 namespace gpu { | 21 namespace gpu { |
| 23 namespace gles2 { | 22 namespace gles2 { |
| 24 class GLES2Interface; | 23 class GLES2Interface; |
| 25 } | 24 } |
| 26 } | 25 } |
| 27 | 26 |
| 28 namespace cc { | 27 namespace cc { |
| 29 | 28 |
| 30 class CC_EXPORT TextureUploader { | 29 class TextureUploader { |
| 31 public: | 30 public: |
| 32 static scoped_ptr<TextureUploader> Create(gpu::gles2::GLES2Interface* gl) { | 31 static scoped_ptr<TextureUploader> Create(gpu::gles2::GLES2Interface* gl) { |
| 33 return make_scoped_ptr(new TextureUploader(gl)); | 32 return make_scoped_ptr(new TextureUploader(gl)); |
| 34 } | 33 } |
| 35 ~TextureUploader(); | 34 ~TextureUploader(); |
| 36 | 35 |
| 37 size_t NumBlockingUploads(); | 36 size_t NumBlockingUploads(); |
| 38 void MarkPendingUploadsAsNonBlocking(); | 37 void MarkPendingUploadsAsNonBlocking(); |
| 39 double EstimatedTexturesPerSecond(); | 38 double EstimatedTexturesPerSecond(); |
| 40 | 39 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 scoped_ptr<uint8[]> sub_image_; | 108 scoped_ptr<uint8[]> sub_image_; |
| 110 | 109 |
| 111 size_t num_texture_uploads_since_last_flush_; | 110 size_t num_texture_uploads_since_last_flush_; |
| 112 | 111 |
| 113 DISALLOW_COPY_AND_ASSIGN(TextureUploader); | 112 DISALLOW_COPY_AND_ASSIGN(TextureUploader); |
| 114 }; | 113 }; |
| 115 | 114 |
| 116 } // namespace cc | 115 } // namespace cc |
| 117 | 116 |
| 118 #endif // CC_RESOURCES_TEXTURE_UPLOADER_H_ | 117 #endif // CC_RESOURCES_TEXTURE_UPLOADER_H_ |
| OLD | NEW |