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

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

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « cc/layers/content_layer_client.h ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_LAYERS_CONTENTS_SCALING_LAYER_H_
6 #define CC_LAYERS_CONTENTS_SCALING_LAYER_H_
7
8 #include "cc/base/cc_export.h"
9 #include "cc/layers/layer.h"
10
11 namespace cc {
12
13 // Base class for layers that need contents scale.
14 // The content bounds are determined by bounds and scale of the contents.
15 class CC_EXPORT ContentsScalingLayer : public Layer {
16 public:
17 void CalculateContentsScale(float ideal_contents_scale,
18 float* contents_scale_x,
19 float* contents_scale_y,
20 gfx::Size* content_bounds) override;
21
22 bool Update(ResourceUpdateQueue* queue,
23 const OcclusionTracker<Layer>* occlusion) override;
24
25 protected:
26 ContentsScalingLayer();
27 ~ContentsScalingLayer() override;
28
29 gfx::Size ComputeContentBoundsForScale(float scale_x, float scale_y) const;
30
31 private:
32 float last_update_contents_scale_x_;
33 float last_update_contents_scale_y_;
34
35 DISALLOW_COPY_AND_ASSIGN(ContentsScalingLayer);
36 };
37
38 } // namespace cc
39
40 #endif // CC_LAYERS_CONTENTS_SCALING_LAYER_H__
OLDNEW
« no previous file with comments | « cc/layers/content_layer_client.h ('k') | cc/layers/contents_scaling_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698