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

Side by Side Diff: webkit/renderer/compositor_bindings/web_layer_impl.cc

Issue 128263006: Remove all traces of compositing reasons from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « webkit/renderer/compositor_bindings/web_layer_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
12 #include "cc/animation/animation.h" 12 #include "cc/animation/animation.h"
13 #include "cc/base/region.h" 13 #include "cc/base/region.h"
14 #include "cc/base/switches.h" 14 #include "cc/base/switches.h"
15 #include "cc/layers/layer.h" 15 #include "cc/layers/layer.h"
16 #include "cc/layers/layer_position_constraint.h" 16 #include "cc/layers/layer_position_constraint.h"
17 #include "third_party/WebKit/public/platform/WebCompositingReasons.h"
18 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 17 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
19 #include "third_party/WebKit/public/platform/WebFloatRect.h" 18 #include "third_party/WebKit/public/platform/WebFloatRect.h"
20 #include "third_party/WebKit/public/platform/WebGraphicsLayerDebugInfo.h" 19 #include "third_party/WebKit/public/platform/WebGraphicsLayerDebugInfo.h"
21 #include "third_party/WebKit/public/platform/WebLayerClient.h" 20 #include "third_party/WebKit/public/platform/WebLayerClient.h"
22 #include "third_party/WebKit/public/platform/WebLayerPositionConstraint.h" 21 #include "third_party/WebKit/public/platform/WebLayerPositionConstraint.h"
23 #include "third_party/WebKit/public/platform/WebLayerScrollClient.h" 22 #include "third_party/WebKit/public/platform/WebLayerScrollClient.h"
24 #include "third_party/WebKit/public/platform/WebSize.h" 23 #include "third_party/WebKit/public/platform/WebSize.h"
25 #include "third_party/skia/include/utils/SkMatrix44.h" 24 #include "third_party/skia/include/utils/SkMatrix44.h"
26 #include "webkit/renderer/compositor_bindings/web_animation_impl.h" 25 #include "webkit/renderer/compositor_bindings/web_animation_impl.h"
27 #include "webkit/renderer/compositor_bindings/web_blend_mode.h" 26 #include "webkit/renderer/compositor_bindings/web_blend_mode.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 static_cast<const WebFilterOperationsImpl&>(filters); 209 static_cast<const WebFilterOperationsImpl&>(filters);
211 layer_->SetFilters(filters_impl.AsFilterOperations()); 210 layer_->SetFilters(filters_impl.AsFilterOperations());
212 } 211 }
213 212
214 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) { 213 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) {
215 const WebFilterOperationsImpl& filters_impl = 214 const WebFilterOperationsImpl& filters_impl =
216 static_cast<const WebFilterOperationsImpl&>(filters); 215 static_cast<const WebFilterOperationsImpl&>(filters);
217 layer_->SetBackgroundFilters(filters_impl.AsFilterOperations()); 216 layer_->SetBackgroundFilters(filters_impl.AsFilterOperations());
218 } 217 }
219 218
220 void WebLayerImpl::setCompositingReasons(
221 blink::WebCompositingReasons reasons) {
222 layer_->SetCompositingReasons(reasons);
223 }
224
225 void WebLayerImpl::setAnimationDelegate( 219 void WebLayerImpl::setAnimationDelegate(
226 blink::WebAnimationDelegate* delegate) { 220 blink::WebAnimationDelegate* delegate) {
227 animation_delegate_adapter_.reset( 221 animation_delegate_adapter_.reset(
228 new WebToCCAnimationDelegateAdapter(delegate)); 222 new WebToCCAnimationDelegateAdapter(delegate));
229 layer_->set_layer_animation_delegate(animation_delegate_adapter_.get()); 223 layer_->set_layer_animation_delegate(animation_delegate_adapter_.get());
230 } 224 }
231 225
232 bool WebLayerImpl::addAnimation(blink::WebAnimation* animation) { 226 bool WebLayerImpl::addAnimation(blink::WebAnimation* animation) {
233 bool result = layer_->AddAnimation( 227 bool result = layer_->AddAnimation(
234 static_cast<WebAnimationImpl*>(animation)->PassAnimation()); 228 static_cast<WebAnimationImpl*>(animation)->PassAnimation());
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 void WebLayerImpl::setClipParent(blink::WebLayer* parent) { 455 void WebLayerImpl::setClipParent(blink::WebLayer* parent) {
462 cc::Layer* clip_parent = NULL; 456 cc::Layer* clip_parent = NULL;
463 if (parent) 457 if (parent)
464 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); 458 clip_parent = static_cast<WebLayerImpl*>(parent)->layer();
465 layer_->SetClipParent(clip_parent); 459 layer_->SetClipParent(clip_parent);
466 } 460 }
467 461
468 Layer* WebLayerImpl::layer() const { return layer_.get(); } 462 Layer* WebLayerImpl::layer() const { return layer_.get(); }
469 463
470 } // namespace webkit 464 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/renderer/compositor_bindings/web_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698