| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |