Index: ui/compositor/compositor.cc |
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc |
index edc79e3096429634229750f39d80acf55316a73b..43fe3a95a6f8e0ac3ff59fa321e0c5f222340fe5 100644 |
--- a/ui/compositor/compositor.cc |
+++ b/ui/compositor/compositor.cc |
@@ -150,25 +150,14 @@ Compositor::Compositor(CompositorDelegate* delegate, |
settings.refreshRate = |
test_compositor_enabled ? kTestRefreshRate : kDefaultRefreshRate; |
-#if defined(WEBLAYER_IS_PURE_VIRTUAL) |
host_.initialize(this, *root_web_layer_, settings); |
root_web_layer_->setAnchorPoint(WebKit::WebFloatPoint(0.f, 0.f)); |
-#else |
- host_.initialize(this, root_web_layer_, settings); |
- root_web_layer_.setAnchorPoint(WebKit::WebFloatPoint(0.f, 0.f)); |
-#endif |
host_.setSurfaceReady(); |
} |
Compositor::~Compositor() { |
// Don't call |CompositorDelegate::ScheduleDraw| from this point. |
delegate_ = NULL; |
-#if !defined(WEBLAYER_IS_PURE_VIRTUAL) |
- // There's a cycle between |root_web_layer_| and |host_|, which results in |
- // leaking and/or crashing. Explicitly set the root layer to NULL so the cycle |
- // is broken. |
- host_.setRootLayer(NULL); |
-#endif |
if (root_layer_) |
root_layer_->SetCompositor(NULL); |
@@ -219,15 +208,9 @@ void Compositor::SetRootLayer(Layer* root_layer) { |
root_layer_ = root_layer; |
if (root_layer_ && !root_layer_->GetCompositor()) |
root_layer_->SetCompositor(this); |
-#if defined(WEBLAYER_IS_PURE_VIRTUAL) |
root_web_layer_->removeAllChildren(); |
if (root_layer_) |
root_web_layer_->addChild(root_layer_->web_layer()); |
-#else |
- root_web_layer_.removeAllChildren(); |
- if (root_layer_) |
- root_web_layer_.addChild(root_layer_->web_layer()); |
-#endif |
} |
void Compositor::Draw(bool force_clear) { |
@@ -281,11 +264,7 @@ void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) { |
return; |
size_ = size_in_pixel; |
host_.setViewportSize(size_in_pixel); |
-#if defined(WEBLAYER_IS_PURE_VIRTUAL) |
root_web_layer_->setBounds(size_in_pixel); |
-#else |
- root_web_layer_.setBounds(size_in_pixel); |
-#endif |
if (device_scale_factor_ != scale) { |
device_scale_factor_ = scale; |