| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/blink/web_layer_impl.h" | 5 #include "cc/blink/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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 | 77 |
| 78 void WebLayerImpl::invalidateRect(const blink::WebFloatRect& rect) { | 78 void WebLayerImpl::invalidateRect(const blink::WebFloatRect& rect) { |
| 79 layer_->SetNeedsDisplayRect(rect); | 79 layer_->SetNeedsDisplayRect(rect); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void WebLayerImpl::invalidate() { | 82 void WebLayerImpl::invalidate() { |
| 83 layer_->SetNeedsDisplay(); | 83 layer_->SetNeedsDisplay(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void WebLayerImpl::setIncludesFirstPaintInvalidation() { |
| 87 layer_->SetIncludesFirstPaintInvalidation(); |
| 88 } |
| 89 |
| 86 void WebLayerImpl::addChild(WebLayer* child) { | 90 void WebLayerImpl::addChild(WebLayer* child) { |
| 87 layer_->AddChild(static_cast<WebLayerImpl*>(child)->layer()); | 91 layer_->AddChild(static_cast<WebLayerImpl*>(child)->layer()); |
| 88 } | 92 } |
| 89 | 93 |
| 90 void WebLayerImpl::insertChild(WebLayer* child, size_t index) { | 94 void WebLayerImpl::insertChild(WebLayer* child, size_t index) { |
| 91 layer_->InsertChild(static_cast<WebLayerImpl*>(child)->layer(), index); | 95 layer_->InsertChild(static_cast<WebLayerImpl*>(child)->layer(), index); |
| 92 } | 96 } |
| 93 | 97 |
| 94 void WebLayerImpl::replaceChild(WebLayer* reference, WebLayer* new_layer) { | 98 void WebLayerImpl::replaceChild(WebLayer* reference, WebLayer* new_layer) { |
| 95 layer_->ReplaceChild(static_cast<WebLayerImpl*>(reference)->layer(), | 99 layer_->ReplaceChild(static_cast<WebLayerImpl*>(reference)->layer(), |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 if (parent) | 474 if (parent) |
| 471 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); | 475 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); |
| 472 layer_->SetClipParent(clip_parent); | 476 layer_->SetClipParent(clip_parent); |
| 473 } | 477 } |
| 474 | 478 |
| 475 Layer* WebLayerImpl::layer() const { | 479 Layer* WebLayerImpl::layer() const { |
| 476 return layer_.get(); | 480 return layer_.get(); |
| 477 } | 481 } |
| 478 | 482 |
| 479 } // namespace cc_blink | 483 } // namespace cc_blink |
| OLD | NEW |