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

Side by Side Diff: cc/layers/layer_impl.cc

Issue 226283004: Rasterize at maximum scale for scale animations on CPU-rasterized layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/painted_scrollbar_layer.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "cc/animation/animation_registrar.h" 10 #include "cc/animation/animation_registrar.h"
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 float contents_scale_y) { 1029 float contents_scale_y) {
1030 if (this->contents_scale_x() == contents_scale_x && 1030 if (this->contents_scale_x() == contents_scale_x &&
1031 this->contents_scale_y() == contents_scale_y) 1031 this->contents_scale_y() == contents_scale_y)
1032 return; 1032 return;
1033 1033
1034 draw_properties_.contents_scale_x = contents_scale_x; 1034 draw_properties_.contents_scale_x = contents_scale_x;
1035 draw_properties_.contents_scale_y = contents_scale_y; 1035 draw_properties_.contents_scale_y = contents_scale_y;
1036 NoteLayerPropertyChanged(); 1036 NoteLayerPropertyChanged();
1037 } 1037 }
1038 1038
1039 void LayerImpl::CalculateContentsScale( 1039 void LayerImpl::CalculateContentsScale(float ideal_contents_scale,
1040 float ideal_contents_scale, 1040 float device_scale_factor,
1041 float device_scale_factor, 1041 float page_scale_factor,
1042 float page_scale_factor, 1042 float maximum_animation_contents_scale,
1043 bool animating_transform_to_screen, 1043 bool animating_transform_to_screen,
1044 float* contents_scale_x, 1044 float* contents_scale_x,
1045 float* contents_scale_y, 1045 float* contents_scale_y,
1046 gfx::Size* content_bounds) { 1046 gfx::Size* content_bounds) {
1047 // Base LayerImpl has all of its content scales and content bounds pushed 1047 // Base LayerImpl has all of its content scales and content bounds pushed
1048 // from its Layer during commit and just reuses those values as-is. 1048 // from its Layer during commit and just reuses those values as-is.
1049 *contents_scale_x = this->contents_scale_x(); 1049 *contents_scale_x = this->contents_scale_x();
1050 *contents_scale_y = this->contents_scale_y(); 1050 *contents_scale_y = this->contents_scale_y();
1051 *content_bounds = this->content_bounds(); 1051 *content_bounds = this->content_bounds();
1052 } 1052 }
1053 1053
1054 void LayerImpl::SetScrollOffsetDelegate( 1054 void LayerImpl::SetScrollOffsetDelegate(
1055 LayerScrollOffsetDelegate* scroll_offset_delegate) { 1055 LayerScrollOffsetDelegate* scroll_offset_delegate) {
1056 // Having both a scroll parent and a scroll offset delegate is unsupported. 1056 // Having both a scroll parent and a scroll offset delegate is unsupported.
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 scoped_ptr<base::Value> LayerImpl::AsValue() const { 1500 scoped_ptr<base::Value> LayerImpl::AsValue() const {
1501 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1501 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1502 AsValueInto(state.get()); 1502 AsValueInto(state.get());
1503 return state.PassAs<base::Value>(); 1503 return state.PassAs<base::Value>();
1504 } 1504 }
1505 1505
1506 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1506 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1507 benchmark->RunOnLayer(this); 1507 benchmark->RunOnLayer(this);
1508 } 1508 }
1509 } // namespace cc 1509 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/painted_scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698