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

Side by Side Diff: cc/UnthrottledTextureUploader.h

Issue 10916292: Adaptively throttle texture uploads (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments in PS2, except constant partials Created 8 years, 3 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
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 UnthrottledTextureUploader_h 5 #ifndef UnthrottledTextureUploader_h
6 #define UnthrottledTextureUploader_h 6 #define UnthrottledTextureUploader_h
7 7
8 #include "CCResourceProvider.h" 8 #include "CCResourceProvider.h"
9 #include "TextureUploader.h" 9 #include "TextureUploader.h"
10 10
11 namespace WebCore { 11 namespace WebCore {
12 12
13 class UnthrottledTextureUploader : public TextureUploader { 13 class UnthrottledTextureUploader : public TextureUploader {
14 WTF_MAKE_NONCOPYABLE(UnthrottledTextureUploader); 14 WTF_MAKE_NONCOPYABLE(UnthrottledTextureUploader);
15 public: 15 public:
16 static PassOwnPtr<UnthrottledTextureUploader> create() 16 static PassOwnPtr<UnthrottledTextureUploader> create()
17 { 17 {
18 return adoptPtr(new UnthrottledTextureUploader()); 18 return adoptPtr(new UnthrottledTextureUploader());
19 } 19 }
20 virtual ~UnthrottledTextureUploader() { } 20 virtual ~UnthrottledTextureUploader() { }
21 21
22 virtual bool isBusy() OVERRIDE { return false; } 22 virtual bool isBusy() OVERRIDE { return false; }
23 virtual double estimatedPixelsPerSecond() { return std::numeric_limits<doubl e>::max(); }
23 virtual void beginUploads() OVERRIDE { } 24 virtual void beginUploads() OVERRIDE { }
24 virtual void endUploads() OVERRIDE { } 25 virtual void endUploads() OVERRIDE { }
25 virtual void uploadTexture(CCResourceProvider* resourceProvider, Parameters upload) OVERRIDE { upload.texture->updateRect(resourceProvider, upload.sourceRec t, upload.destOffset); } 26 virtual void uploadTexture(CCResourceProvider* resourceProvider, Parameters upload) OVERRIDE { upload.texture->updateRect(resourceProvider, upload.sourceRec t, upload.destOffset); }
26 27
27 protected: 28 protected:
28 UnthrottledTextureUploader() { } 29 UnthrottledTextureUploader() { }
29 }; 30 };
30 31
31 } 32 }
32 33
33 #endif 34 #endif
OLDNEW
« cc/ThrottledTextureUploader.h ('K') | « cc/ThrottledTextureUploader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698