| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" | 5 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event_impl.h" | 8 #include "base/debug/trace_event_impl.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 layer_->SetIsDrawable(draws_content); | 181 layer_->SetIsDrawable(draws_content); |
| 182 } | 182 } |
| 183 | 183 |
| 184 bool WebLayerImpl::drawsContent() const { return layer_->DrawsContent(); } | 184 bool WebLayerImpl::drawsContent() const { return layer_->DrawsContent(); } |
| 185 | 185 |
| 186 void WebLayerImpl::setShouldFlattenTransform(bool flatten) { | 186 void WebLayerImpl::setShouldFlattenTransform(bool flatten) { |
| 187 layer_->SetShouldFlattenTransform(flatten); | 187 layer_->SetShouldFlattenTransform(flatten); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void WebLayerImpl::setRenderingContext(int context) { | 190 void WebLayerImpl::setRenderingContext(int context) { |
| 191 layer_->SetIs3dSorted(context != 0); | 191 layer_->SetContextId(context); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void WebLayerImpl::setUseParentBackfaceVisibility( | 194 void WebLayerImpl::setUseParentBackfaceVisibility( |
| 195 bool use_parent_backface_visibility) { | 195 bool use_parent_backface_visibility) { |
| 196 layer_->set_use_parent_backface_visibility(use_parent_backface_visibility); | 196 layer_->set_use_parent_backface_visibility(use_parent_backface_visibility); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void WebLayerImpl::setBackgroundColor(WebColor color) { | 199 void WebLayerImpl::setBackgroundColor(WebColor color) { |
| 200 layer_->SetBackgroundColor(color); | 200 layer_->SetBackgroundColor(color); |
| 201 } | 201 } |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 void WebLayerImpl::setClipParent(blink::WebLayer* parent) { | 449 void WebLayerImpl::setClipParent(blink::WebLayer* parent) { |
| 450 cc::Layer* clip_parent = NULL; | 450 cc::Layer* clip_parent = NULL; |
| 451 if (parent) | 451 if (parent) |
| 452 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); | 452 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); |
| 453 layer_->SetClipParent(clip_parent); | 453 layer_->SetClipParent(clip_parent); |
| 454 } | 454 } |
| 455 | 455 |
| 456 Layer* WebLayerImpl::layer() const { return layer_.get(); } | 456 Layer* WebLayerImpl::layer() const { return layer_.get(); } |
| 457 | 457 |
| 458 } // namespace webkit | 458 } // namespace webkit |
| OLD | NEW |