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

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

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 years, 9 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/layers/contents_scaling_layer.h ('k') | cc/layers/heads_up_display_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/contents_scaling_layer.h" 5 #include "cc/layers/contents_scaling_layer.h"
6 #include "ui/gfx/size_conversions.h" 6 #include "ui/gfx/size_conversions.h"
7 7
8 namespace cc { 8 namespace cc {
9 9
10 gfx::Size ContentsScalingLayer::ComputeContentBoundsForScale( 10 gfx::Size ContentsScalingLayer::ComputeContentBoundsForScale(
(...skipping 17 matching lines...) Expand all
28 gfx::Size* content_bounds) { 28 gfx::Size* content_bounds) {
29 *contents_scale_x = ideal_contents_scale; 29 *contents_scale_x = ideal_contents_scale;
30 *contents_scale_y = ideal_contents_scale; 30 *contents_scale_y = ideal_contents_scale;
31 *content_bounds = ComputeContentBoundsForScale( 31 *content_bounds = ComputeContentBoundsForScale(
32 ideal_contents_scale, 32 ideal_contents_scale,
33 ideal_contents_scale); 33 ideal_contents_scale);
34 } 34 }
35 35
36 void ContentsScalingLayer::Update( 36 void ContentsScalingLayer::Update(
37 ResourceUpdateQueue* queue, 37 ResourceUpdateQueue* queue,
38 const OcclusionTracker* occlusion, 38 const OcclusionTracker* occlusion) {
39 RenderingStats* stats) {
40 if (draw_properties().contents_scale_x == last_update_contents_scale_x_ && 39 if (draw_properties().contents_scale_x == last_update_contents_scale_x_ &&
41 draw_properties().contents_scale_y == last_update_contents_scale_y_) 40 draw_properties().contents_scale_y == last_update_contents_scale_y_)
42 return; 41 return;
43 42
44 last_update_contents_scale_x_ = draw_properties().contents_scale_x; 43 last_update_contents_scale_x_ = draw_properties().contents_scale_x;
45 last_update_contents_scale_y_ = draw_properties().contents_scale_y; 44 last_update_contents_scale_y_ = draw_properties().contents_scale_y;
46 // Invalidate the whole layer if scale changed. 45 // Invalidate the whole layer if scale changed.
47 SetNeedsDisplayRect(gfx::Rect(bounds())); 46 SetNeedsDisplayRect(gfx::Rect(bounds()));
48 } 47 }
49 48
50 } // namespace cc 49 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/contents_scaling_layer.h ('k') | cc/layers/heads_up_display_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698