| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 ASH_FAST_INK_FAST_INK_VIEW_H_ | 5 #ifndef ASH_FAST_INK_FAST_INK_VIEW_H_ |
| 6 #define ASH_FAST_INK_FAST_INK_VIEW_H_ | 6 #define ASH_FAST_INK_FAST_INK_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/containers/flat_map.h" | 11 #include "base/containers/flat_map.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "cc/base/resource_id.h" |
| 14 #include "ui/views/view.h" | 15 #include "ui/views/view.h" |
| 15 | 16 |
| 16 namespace aura { | 17 namespace aura { |
| 17 class Window; | 18 class Window; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace cc { | 21 namespace cc { |
| 21 struct ReturnedResource; | 22 struct ReturnedResource; |
| 22 } | 23 } |
| 23 | 24 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 std::unique_ptr<views::Widget> widget_; | 68 std::unique_ptr<views::Widget> widget_; |
| 68 float scale_factor_ = 1.0f; | 69 float scale_factor_ = 1.0f; |
| 69 std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_; | 70 std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_; |
| 70 gfx::Rect buffer_damage_rect_; | 71 gfx::Rect buffer_damage_rect_; |
| 71 bool pending_update_buffer_ = false; | 72 bool pending_update_buffer_ = false; |
| 72 gfx::Rect surface_damage_rect_; | 73 gfx::Rect surface_damage_rect_; |
| 73 bool needs_update_surface_ = false; | 74 bool needs_update_surface_ = false; |
| 74 bool pending_draw_surface_ = false; | 75 bool pending_draw_surface_ = false; |
| 75 std::unique_ptr<FastInkLayerTreeFrameSinkHolder> frame_sink_holder_; | 76 std::unique_ptr<FastInkLayerTreeFrameSinkHolder> frame_sink_holder_; |
| 76 int next_resource_id_ = 1; | 77 int next_resource_id_ = 1; |
| 77 base::flat_map<int, std::unique_ptr<FastInkResource>> resources_; | 78 base::flat_map<cc::ResourceId, std::unique_ptr<FastInkResource>> resources_; |
| 78 std::vector<std::unique_ptr<FastInkResource>> returned_resources_; | 79 std::vector<std::unique_ptr<FastInkResource>> returned_resources_; |
| 79 base::WeakPtrFactory<FastInkView> weak_ptr_factory_; | 80 base::WeakPtrFactory<FastInkView> weak_ptr_factory_; |
| 80 | 81 |
| 81 DISALLOW_COPY_AND_ASSIGN(FastInkView); | 82 DISALLOW_COPY_AND_ASSIGN(FastInkView); |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 } // namespace ash | 85 } // namespace ash |
| 85 | 86 |
| 86 #endif // ASH_FAST_INK_FAST_INK_VIEW_H_ | 87 #endif // ASH_FAST_INK_FAST_INK_VIEW_H_ |
| OLD | NEW |