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

Unified Diff: cc/layers/layer.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 7c0341b28f0b237e8ad82fdf3db186b9249989ba..fb72c73b9c483b0b289a429e75e4095e3b71797d 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -594,6 +594,10 @@ void Layer::SetTransformOrigin(const gfx::Point3F& transform_origin) {
SetNeedsCommit();
}
+bool Layer::AnimationsPreserveAxisAlignment() const {
+ return layer_animation_controller_->AnimationsPreserveAxisAlignment();
+}
+
bool Layer::TransformIsAnimating() const {
return layer_animation_controller_->IsAnimatingProperty(Animation::Transform);
}
@@ -881,9 +885,9 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->SetDoubleSided(double_sided_);
layer->SetDrawCheckerboardForMissingTiles(
draw_checkerboard_for_missing_tiles_);
- layer->SetForceRenderSurface(force_render_surface_);
layer->SetDrawsContent(DrawsContent());
layer->SetHideLayerAndSubtree(hide_layer_and_subtree_);
+ layer->SetHasRenderSurface(has_render_surface_);
if (!layer->FilterIsAnimatingOnImplOnly() && !FilterIsAnimating())
layer->SetFilters(filters_);
DCHECK(!(FilterIsAnimating() && layer->FilterIsAnimatingOnImplOnly()));
@@ -1084,19 +1088,27 @@ scoped_refptr<base::debug::ConvertableToTraceFormat> Layer::TakeDebugInfo() {
return nullptr;
}
+void Layer::SetHasRenderSurface(bool has_render_surface) {
+ if (has_render_surface_ == has_render_surface)
+ return;
+ has_render_surface_ = has_render_surface;
+ // We do not need SetNeedsCommit here, since this is only ever called
+ // during a commit, from CalculateDrawProperties.
+ SetNeedsPushProperties();
+}
+
void Layer::CreateRenderSurface() {
- DCHECK(!draw_properties_.render_surface);
- draw_properties_.render_surface = make_scoped_ptr(new RenderSurface(this));
- draw_properties_.render_target = this;
+ DCHECK(!render_surface_);
+ render_surface_ = make_scoped_ptr(new RenderSurface(this));
}
void Layer::ClearRenderSurface() {
- draw_properties_.render_surface = nullptr;
+ render_surface_ = nullptr;
}
void Layer::ClearRenderSurfaceLayerList() {
- if (draw_properties_.render_surface)
- draw_properties_.render_surface->layer_list().clear();
+ if (render_surface_)
+ render_surface_->ClearLayerLists();
}
gfx::ScrollOffset Layer::ScrollOffsetForAnimation() const {
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698