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

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

Issue 1166983007: Fix SurfaceLayerImpl scale under impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows compile fix OOPS Created 5 years, 6 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 | « no previous file | cc/layers/surface_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SURFACE_LAYER_H_ 5 #ifndef CC_LAYERS_SURFACE_LAYER_H_
6 #define CC_LAYERS_SURFACE_LAYER_H_ 6 #define CC_LAYERS_SURFACE_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 #include "cc/surfaces/surface_id.h" 10 #include "cc/surfaces/surface_id.h"
(...skipping 19 matching lines...) Expand all
30 const LayerSettings& settings, 30 const LayerSettings& settings,
31 const SatisfyCallback& satisfy_callback, 31 const SatisfyCallback& satisfy_callback,
32 const RequireCallback& require_callback); 32 const RequireCallback& require_callback);
33 33
34 void SetSurfaceId(SurfaceId surface_id, float scale, const gfx::Size& size); 34 void SetSurfaceId(SurfaceId surface_id, float scale, const gfx::Size& size);
35 35
36 // Layer overrides. 36 // Layer overrides.
37 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 37 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
38 void SetLayerTreeHost(LayerTreeHost* host) override; 38 void SetLayerTreeHost(LayerTreeHost* host) override;
39 void PushPropertiesTo(LayerImpl* layer) override; 39 void PushPropertiesTo(LayerImpl* layer) override;
40 void CalculateContentsScale(float ideal_contents_scale,
41 float* contents_scale_x,
42 float* contents_scale_y,
43 gfx::Size* content_bounds) override;
44 40
45 protected: 41 protected:
46 SurfaceLayer(const LayerSettings& settings, 42 SurfaceLayer(const LayerSettings& settings,
47 const SatisfyCallback& satisfy_callback, 43 const SatisfyCallback& satisfy_callback,
48 const RequireCallback& require_callback); 44 const RequireCallback& require_callback);
49 bool HasDrawableContent() const override; 45 bool HasDrawableContent() const override;
50 46
51 private: 47 private:
52 ~SurfaceLayer() override; 48 ~SurfaceLayer() override;
53 void CreateNewDestroySequence(); 49 void CreateNewDestroySequence();
54 void SatisfyDestroySequence(); 50 void SatisfyDestroySequence();
55 51
56 SurfaceId surface_id_; 52 SurfaceId surface_id_;
57 gfx::Size surface_size_; 53 gfx::Size surface_size_;
58 float surface_scale_; 54 float surface_scale_;
59 SurfaceSequence destroy_sequence_; 55 SurfaceSequence destroy_sequence_;
60 SatisfyCallback satisfy_callback_; 56 SatisfyCallback satisfy_callback_;
61 RequireCallback require_callback_; 57 RequireCallback require_callback_;
62 58
63 DISALLOW_COPY_AND_ASSIGN(SurfaceLayer); 59 DISALLOW_COPY_AND_ASSIGN(SurfaceLayer);
64 }; 60 };
65 61
66 } // namespace cc 62 } // namespace cc
67 63
68 #endif // CC_LAYERS_SURFACE_LAYER_H_ 64 #endif // CC_LAYERS_SURFACE_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/surface_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698