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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 10917181: Use WebCompositorSupport instead of static functions in compositor_impl_android.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 84881c9ae133bd51632e4f409d9c087b87820b94..2b5989d8242cefb393159d1e228e011dc70f0857 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -11,7 +11,8 @@
#include "content/common/gpu/client/gpu_channel_host.h"
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositor.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/Platform.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorSupport.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutputSurface.h"
namespace {
@@ -69,11 +70,12 @@ Compositor* Compositor::Create() {
// static
void Compositor::Initialize() {
- WebKit::WebCompositor::initialize(NULL);
+ WebKit::Platform::current()->compositorSupport()->initialize(NULL);
}
-CompositorImpl::CompositorImpl()
- : root_layer_(WebKit::WebLayer::create()) {
+CompositorImpl::CompositorImpl() {
+ root_layer_.reset(
+ WebKit::Platform::current()->compositorSupport()->createLayer());
}
CompositorImpl::~CompositorImpl() {
@@ -96,7 +98,10 @@ void CompositorImpl::SetWindowSurface(ANativeWindow* window) {
context_.reset(GraphicsContext::CreateForUI(window));
WebKit::WebLayerTreeView::Settings settings;
settings.refreshRate = 60.0;
- host_.reset(WebKit::WebLayerTreeView::create(this, *root_layer_, settings));
+ WebKit::WebCompositorSupport* compositor_support =
+ WebKit::Platform::current()->compositorSupport();
+ host_.reset(
+ compositor_support->createLayerTreeView(this, *root_layer_, settings));
host_->setVisible(true);
host_->setSurfaceReady();
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698