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

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

Issue 1010663002: CC Animations: Redirect all compositor animation requests to AnimationHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@introduce
Patch Set: Add ported unittests. Created 5 years, 8 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
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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 layer_->SetLayerClient(this); 55 layer_->SetLayerClient(this);
56 } 56 }
57 57
58 WebLayerImpl::WebLayerImpl(scoped_refptr<Layer> layer) : layer_(layer) { 58 WebLayerImpl::WebLayerImpl(scoped_refptr<Layer> layer) : layer_(layer) {
59 web_layer_client_ = nullptr; 59 web_layer_client_ = nullptr;
60 layer_->SetLayerClient(this); 60 layer_->SetLayerClient(this);
61 } 61 }
62 62
63 WebLayerImpl::~WebLayerImpl() { 63 WebLayerImpl::~WebLayerImpl() {
64 layer_->ClearRenderSurface(); 64 layer_->ClearRenderSurface();
65 layer_->set_layer_animation_delegate(nullptr); 65 if (animation_delegate_adapter_.get())
66 layer_->set_layer_animation_delegate(nullptr);
66 web_layer_client_ = nullptr; 67 web_layer_client_ = nullptr;
67 } 68 }
68 69
69 // static 70 // static
70 bool WebLayerImpl::UsingPictureLayer() { 71 bool WebLayerImpl::UsingPictureLayer() {
71 return g_impl_side_painting_enabled; 72 return g_impl_side_painting_enabled;
72 } 73 }
73 74
74 // static 75 // static
75 void WebLayerImpl::SetImplSidePaintingEnabled(bool enabled) { 76 void WebLayerImpl::SetImplSidePaintingEnabled(bool enabled) {
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 if (parent) 515 if (parent)
515 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); 516 clip_parent = static_cast<WebLayerImpl*>(parent)->layer();
516 layer_->SetClipParent(clip_parent); 517 layer_->SetClipParent(clip_parent);
517 } 518 }
518 519
519 Layer* WebLayerImpl::layer() const { 520 Layer* WebLayerImpl::layer() const {
520 return layer_.get(); 521 return layer_.get();
521 } 522 }
522 523
523 } // namespace cc_blink 524 } // namespace cc_blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698