| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_RESOURCE_LAYER_H_ | 5 #ifndef CC_LAYERS_UI_RESOURCE_LAYER_H_ |
| 6 #define CC_LAYERS_UI_RESOURCE_LAYER_H_ | 6 #define CC_LAYERS_UI_RESOURCE_LAYER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 11 #include "cc/layers/layer.h" | 12 #include "cc/layers/layer.h" |
| 12 #include "cc/resources/ui_resource_client.h" | 13 #include "cc/resources/ui_resource_client.h" |
| 13 #include "ui/gfx/geometry/rect.h" | 14 #include "ui/gfx/geometry/rect.h" |
| 14 | 15 |
| 15 namespace cc { | 16 namespace cc { |
| 16 | 17 |
| 17 class LayerTreeHost; | 18 class LayerTreeHost; |
| 18 class ScopedUIResource; | 19 class ScopedUIResource; |
| 19 | 20 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 47 virtual UIResourceId id() = 0; | 48 virtual UIResourceId id() = 0; |
| 48 virtual ~UIResourceHolder(); | 49 virtual ~UIResourceHolder(); |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 protected: | 52 protected: |
| 52 UIResourceLayer(); | 53 UIResourceLayer(); |
| 53 ~UIResourceLayer() override; | 54 ~UIResourceLayer() override; |
| 54 | 55 |
| 55 bool HasDrawableContent() const override; | 56 bool HasDrawableContent() const override; |
| 56 | 57 |
| 57 scoped_ptr<UIResourceHolder> ui_resource_holder_; | 58 std::unique_ptr<UIResourceHolder> ui_resource_holder_; |
| 58 SkBitmap bitmap_; | 59 SkBitmap bitmap_; |
| 59 | 60 |
| 60 gfx::PointF uv_top_left_; | 61 gfx::PointF uv_top_left_; |
| 61 gfx::PointF uv_bottom_right_; | 62 gfx::PointF uv_bottom_right_; |
| 62 float vertex_opacity_[4]; | 63 float vertex_opacity_[4]; |
| 63 | 64 |
| 64 private: | 65 private: |
| 65 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 66 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
| 66 void RecreateUIResourceHolder(); | 67 void RecreateUIResourceHolder(); |
| 67 | 68 |
| 68 DISALLOW_COPY_AND_ASSIGN(UIResourceLayer); | 69 DISALLOW_COPY_AND_ASSIGN(UIResourceLayer); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace cc | 72 } // namespace cc |
| 72 | 73 |
| 73 #endif // CC_LAYERS_UI_RESOURCE_LAYER_H_ | 74 #endif // CC_LAYERS_UI_RESOURCE_LAYER_H_ |
| OLD | NEW |