| 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 ThrottledTextureUploader_h | 5 #ifndef ThrottledTextureUploader_h |
| 6 #define ThrottledTextureUploader_h | 6 #define ThrottledTextureUploader_h |
| 7 | 7 |
| 8 #include "cc/texture_uploader.h" | 8 #include "cc/texture_uploader.h" |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public: | 22 public: |
| 23 static scoped_ptr<ThrottledTextureUploader> create(WebKit::WebGraphicsContex
t3D* context) | 23 static scoped_ptr<ThrottledTextureUploader> create(WebKit::WebGraphicsContex
t3D* context) |
| 24 { | 24 { |
| 25 return make_scoped_ptr(new ThrottledTextureUploader(context)); | 25 return make_scoped_ptr(new ThrottledTextureUploader(context)); |
| 26 } | 26 } |
| 27 virtual ~ThrottledTextureUploader(); | 27 virtual ~ThrottledTextureUploader(); |
| 28 | 28 |
| 29 virtual size_t numBlockingUploads() OVERRIDE; | 29 virtual size_t numBlockingUploads() OVERRIDE; |
| 30 virtual void markPendingUploadsAsNonBlocking() OVERRIDE; | 30 virtual void markPendingUploadsAsNonBlocking() OVERRIDE; |
| 31 virtual double estimatedTexturesPerSecond() OVERRIDE; | 31 virtual double estimatedTexturesPerSecond() OVERRIDE; |
| 32 virtual void uploadTexture(CCResourceProvider*, Parameters) OVERRIDE; | 32 virtual void uploadTexture(ResourceProvider*, Parameters) OVERRIDE; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 class Query { | 35 class Query { |
| 36 public: | 36 public: |
| 37 static scoped_ptr<Query> create(WebKit::WebGraphicsContext3D* context) {
return make_scoped_ptr(new Query(context)); } | 37 static scoped_ptr<Query> create(WebKit::WebGraphicsContext3D* context) {
return make_scoped_ptr(new Query(context)); } |
| 38 | 38 |
| 39 virtual ~Query(); | 39 virtual ~Query(); |
| 40 | 40 |
| 41 void begin(); | 41 void begin(); |
| 42 void end(); | 42 void end(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 68 ScopedPtrDeque<Query> m_availableQueries; | 68 ScopedPtrDeque<Query> m_availableQueries; |
| 69 std::deque<double> m_texturesPerSecondHistory; | 69 std::deque<double> m_texturesPerSecondHistory; |
| 70 size_t m_numBlockingTextureUploads; | 70 size_t m_numBlockingTextureUploads; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(ThrottledTextureUploader); | 72 DISALLOW_COPY_AND_ASSIGN(ThrottledTextureUploader); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } | 75 } |
| 76 | 76 |
| 77 #endif | 77 #endif |
| OLD | NEW |