diff options
author | brianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 01:51:17 +0000 |
---|---|---|
committer | brianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 01:51:17 +0000 |
commit | 41b8f68e385878d06d578febf0e6e700fb2a99ba (patch) | |
tree | 137928af89d5a22fadc7b68966979b9a9204b77a /cc/UnthrottledTextureUploader.h | |
parent | 835af8b9cd3b376b6784a581cefa3dc4df4bf9d0 (diff) | |
download | chromium_src-41b8f68e385878d06d578febf0e6e700fb2a99ba.zip chromium_src-41b8f68e385878d06d578febf0e6e700fb2a99ba.tar.gz chromium_src-41b8f68e385878d06d578febf0e6e700fb2a99ba.tar.bz2 |
Adaptively throttle texture uploads
We need adaptive texture uploading because we run on a wide variety
of systems and a one size fits all policy will not work.
This patch maintains a tick rate of 4ms and default upload count of
12 textures per tick, but allows for more textures per tick if we've
measured that we can be faster.
The number of partial updates allowed is also communicated from the
impl thread to the main thread at the beggining of each frame.
BUG=145825
Review URL: https://chromiumcodereview.appspot.com/10916292
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157473 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/UnthrottledTextureUploader.h')
-rw-r--r-- | cc/UnthrottledTextureUploader.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/UnthrottledTextureUploader.h b/cc/UnthrottledTextureUploader.h index 3e24d90..4f97baf 100644 --- a/cc/UnthrottledTextureUploader.h +++ b/cc/UnthrottledTextureUploader.h @@ -20,6 +20,7 @@ public: virtual ~UnthrottledTextureUploader() { } virtual bool isBusy() OVERRIDE { return false; } + virtual double estimatedTexturesPerSecond() { return std::numeric_limits<double>::max(); } virtual void beginUploads() OVERRIDE { } virtual void endUploads() OVERRIDE { } virtual void uploadTexture(CCResourceProvider* resourceProvider, Parameters upload) OVERRIDE { upload.texture->updateRect(resourceProvider, upload.sourceRect, upload.destOffset); } |