| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_UI_WS_FRAME_GENERATOR_H_ | 5 #ifndef SERVICES_UI_WS_FRAME_GENERATOR_H_ |
| 6 #define SERVICES_UI_WS_FRAME_GENERATOR_H_ | 6 #define SERVICES_UI_WS_FRAME_GENERATOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
| 12 #include "cc/surfaces/frame_sink_id.h" |
| 12 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
| 13 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 14 | 15 |
| 15 namespace cc { | 16 namespace cc { |
| 16 class CompositorFrame; | 17 class CompositorFrame; |
| 17 class CopyOutputRequest; | 18 class CopyOutputRequest; |
| 18 class RenderPass; | 19 class RenderPass; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace gpu { | 22 namespace gpu { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // DrawWindowTree recursively visits ServerWindows, creating a SurfaceDrawQuad | 80 // DrawWindowTree recursively visits ServerWindows, creating a SurfaceDrawQuad |
| 80 // for each that lacks one. | 81 // for each that lacks one. |
| 81 void DrawWindowTree(cc::RenderPass* pass, | 82 void DrawWindowTree(cc::RenderPass* pass, |
| 82 ServerWindow* window, | 83 ServerWindow* window, |
| 83 const gfx::Vector2d& parent_to_root_origin_offset, | 84 const gfx::Vector2d& parent_to_root_origin_offset, |
| 84 float opacity, | 85 float opacity, |
| 85 bool* may_contain_video) const; | 86 bool* may_contain_video) const; |
| 86 | 87 |
| 87 FrameGeneratorDelegate* delegate_; | 88 FrameGeneratorDelegate* delegate_; |
| 88 scoped_refptr<DisplayCompositor> display_compositor_; | 89 scoped_refptr<DisplayCompositor> display_compositor_; |
| 90 cc::FrameSinkId frame_sink_id_; |
| 89 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; | 91 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; |
| 90 | 92 |
| 91 std::unique_ptr<surfaces::CompositorFrameSink> compositor_frame_sink_; | 93 std::unique_ptr<surfaces::CompositorFrameSink> compositor_frame_sink_; |
| 92 gfx::AcceleratedWidget widget_ = gfx::kNullAcceleratedWidget; | 94 gfx::AcceleratedWidget widget_ = gfx::kNullAcceleratedWidget; |
| 93 | 95 |
| 94 // The region that needs to be redrawn next time the compositor frame is | 96 // The region that needs to be redrawn next time the compositor frame is |
| 95 // generated. | 97 // generated. |
| 96 gfx::Rect dirty_rect_; | 98 gfx::Rect dirty_rect_; |
| 97 base::Timer draw_timer_; | 99 base::Timer draw_timer_; |
| 98 bool frame_pending_ = false; | 100 bool frame_pending_ = false; |
| 99 bool may_contain_video_ = false; | 101 bool may_contain_video_ = false; |
| 100 | 102 |
| 101 base::WeakPtrFactory<FrameGenerator> weak_factory_; | 103 base::WeakPtrFactory<FrameGenerator> weak_factory_; |
| 102 | 104 |
| 103 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); | 105 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); |
| 104 }; | 106 }; |
| 105 | 107 |
| 106 } // namespace ws | 108 } // namespace ws |
| 107 | 109 |
| 108 } // namespace ui | 110 } // namespace ui |
| 109 | 111 |
| 110 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ | 112 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ |
| OLD | NEW |