Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: cc/throttled_texture_uploader.h

Issue 11183006: cc: Remove wtf includes from resource provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/texture_update_controller_unittest.cc ('k') | cc/throttled_texture_uploader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/memory/scoped_ptr.h"
11 #include <deque> 12 #include <deque>
12 #include <wtf/Deque.h> 13 #include <wtf/Deque.h>
13 #include <wtf/PassOwnPtr.h> 14 #include <wtf/PassOwnPtr.h>
14 15
15 namespace WebKit { 16 namespace WebKit {
16 class WebGraphicsContext3D; 17 class WebGraphicsContext3D;
17 } 18 }
18 19
19 namespace cc { 20 namespace cc {
20 21
21 class ThrottledTextureUploader : public TextureUploader { 22 class ThrottledTextureUploader : public TextureUploader {
22 public: 23 public:
23 static PassOwnPtr<ThrottledTextureUploader> create(WebKit::WebGraphicsContex t3D* context) 24 static scoped_ptr<ThrottledTextureUploader> create(WebKit::WebGraphicsContex t3D* context)
24 { 25 {
25 return adoptPtr(new ThrottledTextureUploader(context)); 26 return make_scoped_ptr(new ThrottledTextureUploader(context));
26 } 27 }
27 virtual ~ThrottledTextureUploader(); 28 virtual ~ThrottledTextureUploader();
28 29
29 virtual size_t numBlockingUploads() OVERRIDE; 30 virtual size_t numBlockingUploads() OVERRIDE;
30 virtual void markPendingUploadsAsNonBlocking() OVERRIDE; 31 virtual void markPendingUploadsAsNonBlocking() OVERRIDE;
31 virtual double estimatedTexturesPerSecond() OVERRIDE; 32 virtual double estimatedTexturesPerSecond() OVERRIDE;
32 virtual void uploadTexture(CCResourceProvider*, Parameters) OVERRIDE; 33 virtual void uploadTexture(CCResourceProvider*, Parameters) OVERRIDE;
33 34
34 private: 35 private:
35 class Query { 36 class Query {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 Deque<OwnPtr<Query> > m_availableQueries; 69 Deque<OwnPtr<Query> > m_availableQueries;
69 std::deque<double> m_texturesPerSecondHistory; 70 std::deque<double> m_texturesPerSecondHistory;
70 size_t m_numBlockingTextureUploads; 71 size_t m_numBlockingTextureUploads;
71 72
72 DISALLOW_COPY_AND_ASSIGN(ThrottledTextureUploader); 73 DISALLOW_COPY_AND_ASSIGN(ThrottledTextureUploader);
73 }; 74 };
74 75
75 } 76 }
76 77
77 #endif 78 #endif
OLDNEW
« no previous file with comments | « cc/texture_update_controller_unittest.cc ('k') | cc/throttled_texture_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698