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

Side by Side Diff: cc/blink/web_layer_impl.cc

Issue 2033513003: (NOT FOR COMMIT) Testing layer invalidation speedups. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 int WebLayerImpl::id() const { 53 int WebLayerImpl::id() const {
54 return layer_->id(); 54 return layer_->id();
55 } 55 }
56 56
57 void WebLayerImpl::invalidateRect(const blink::WebRect& rect) { 57 void WebLayerImpl::invalidateRect(const blink::WebRect& rect) {
58 layer_->SetNeedsDisplayRect(rect); 58 layer_->SetNeedsDisplayRect(rect);
59 } 59 }
60 60
61 void WebLayerImpl::invalidateRects(const std::vector<blink::WebRect>& rects) {
62 for (size_t i = 0; i < rects.size(); ++i) {
63 layer_->SetNeedsDisplayRect(rects[i]);
64 }
65 }
66
61 void WebLayerImpl::invalidate() { 67 void WebLayerImpl::invalidate() {
62 layer_->SetNeedsDisplay(); 68 layer_->SetNeedsDisplay();
63 } 69 }
64 70
65 void WebLayerImpl::addChild(WebLayer* child) { 71 void WebLayerImpl::addChild(WebLayer* child) {
66 layer_->AddChild(static_cast<WebLayerImpl*>(child)->layer()); 72 layer_->AddChild(static_cast<WebLayerImpl*>(child)->layer());
67 } 73 }
68 74
69 void WebLayerImpl::insertChild(WebLayer* child, size_t index) { 75 void WebLayerImpl::insertChild(WebLayer* child, size_t index) {
70 layer_->InsertChild(static_cast<WebLayerImpl*>(child)->layer(), index); 76 layer_->InsertChild(static_cast<WebLayerImpl*>(child)->layer(), index);
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 421
416 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { 422 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) {
417 contents_opaque_is_fixed_ = fixed; 423 contents_opaque_is_fixed_ = fixed;
418 } 424 }
419 425
420 void WebLayerImpl::setHasWillChangeTransformHint(bool has_will_change) { 426 void WebLayerImpl::setHasWillChangeTransformHint(bool has_will_change) {
421 layer_->SetHasWillChangeTransformHint(has_will_change); 427 layer_->SetHasWillChangeTransformHint(has_will_change);
422 } 428 }
423 429
424 } // namespace cc_blink 430 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698