diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-13 19:35:37 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-13 19:35:37 +0000 |
commit | 2700dadddb63e42fad2ab8ddfee50386279e2641 (patch) | |
tree | 7ed18b44891af2f3547ba210650efd23d8ec1026 /ui/aura/bench | |
parent | 64e612ee4be7e308a0708fef6b81171ff5c2d43f (diff) | |
download | chromium_src-2700dadddb63e42fad2ab8ddfee50386279e2641.zip chromium_src-2700dadddb63e42fad2ab8ddfee50386279e2641.tar.gz chromium_src-2700dadddb63e42fad2ab8ddfee50386279e2641.tar.bz2 |
Aura: Have ui::Layer implement WebKit::WebExternalTextureLayerClient
With --ui-enable-threaded-compositing, every Layer::SetExternalTexture() was causing a heavy CCThreadProxy::acquireLayerTextures(). This synchronization is unnecessary on the common case of buffer flips, because RWHVA handles the necessary synchronization via OnCompositingWillStart callbacks.
To reduce the synchronization burden, we handle
- wait for a commit on resize fast ACKS
- handle the common case of buffer flips via WebExternalTextureLayerClient::prepareTexture()
- and explicitly call WebExternalTextureLayer::willModifyTexture() when we need the extra synchronization on tear down.
BUG=136012
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10689108
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/bench')
-rw-r--r-- | ui/aura/bench/bench_main.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc index 7d416757..0430901 100644 --- a/ui/aura/bench/bench_main.cc +++ b/ui/aura/bench/bench_main.cc @@ -91,6 +91,9 @@ class BenchCompositorObserver : public ui::CompositorObserver { frames_(0), max_frames_(max_frames) { } + + virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE {} + virtual void OnCompositingWillStart(Compositor* compositor) OVERRIDE {} virtual void OnCompositingStarted(Compositor* compositor) OVERRIDE {} @@ -144,6 +147,10 @@ class WebGLTexture : public ui::Texture { GL_RGBA, GL_UNSIGNED_BYTE, NULL); } + virtual WebGraphicsContext3D* HostContext3D() OVERRIDE { + return context_; + } + private: virtual ~WebGLTexture() { context_->deleteTexture(texture_id()); |