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

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

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, 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
« no previous file with comments | « cc/layers/content_layer_unittest.cc ('k') | cc/layers/contents_scaling_layer.cc » ('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 #ifndef CC_LAYERS_CONTENTS_SCALING_LAYER_H_ 5 #ifndef CC_LAYERS_CONTENTS_SCALING_LAYER_H_
6 #define CC_LAYERS_CONTENTS_SCALING_LAYER_H_ 6 #define CC_LAYERS_CONTENTS_SCALING_LAYER_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 // Base class for layers that need contents scale. 13 // Base class for layers that need contents scale.
14 // The content bounds are determined by bounds and scale of the contents. 14 // The content bounds are determined by bounds and scale of the contents.
15 class CC_EXPORT ContentsScalingLayer : public Layer { 15 class CC_EXPORT ContentsScalingLayer : public Layer {
16 public: 16 public:
17 virtual void CalculateContentsScale( 17 virtual void CalculateContentsScale(
18 float ideal_contents_scale, 18 float ideal_contents_scale,
19 bool animating_transform_to_screen, 19 bool animating_transform_to_screen,
20 float* contents_scale_x, 20 float* contents_scale_x,
21 float* contents_scale_y, 21 float* contents_scale_y,
22 gfx::Size* content_bounds) OVERRIDE; 22 gfx::Size* content_bounds) OVERRIDE;
23 23
24 virtual void Update( 24 virtual void Update(
25 ResourceUpdateQueue* queue, 25 ResourceUpdateQueue* queue,
26 const OcclusionTracker* occlusion, 26 const OcclusionTracker* occlusion) OVERRIDE;
27 RenderingStats* stats) OVERRIDE;
28 27
29 protected: 28 protected:
30 ContentsScalingLayer(); 29 ContentsScalingLayer();
31 virtual ~ContentsScalingLayer(); 30 virtual ~ContentsScalingLayer();
32 31
33 gfx::Size ComputeContentBoundsForScale(float scale_x, float scale_y) const; 32 gfx::Size ComputeContentBoundsForScale(float scale_x, float scale_y) const;
34 33
35 private: 34 private:
36 float last_update_contents_scale_x_; 35 float last_update_contents_scale_x_;
37 float last_update_contents_scale_y_; 36 float last_update_contents_scale_y_;
38 }; 37 };
39 38
40 } // namespace cc 39 } // namespace cc
41 40
42 #endif // CC_LAYERS_CONTENTS_SCALING_LAYER_H__ 41 #endif // CC_LAYERS_CONTENTS_SCALING_LAYER_H__
OLDNEW
« no previous file with comments | « cc/layers/content_layer_unittest.cc ('k') | cc/layers/contents_scaling_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698