Chromium Code Reviews| 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 SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ | 5 #ifndef SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ |
| 6 #define SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ | 6 #define SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "cc/output/in_process_context_provider.h" | 10 #include "cc/output/in_process_context_provider.h" |
| 11 #include "cc/output/output_surface.h" | 11 #include "cc/output/output_surface.h" |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 class SyntheticBeginFrameSource; | 14 class SyntheticBeginFrameSource; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace latency_tracker { | |
| 18 class LatencyTracker; | |
| 19 } | |
| 20 | |
| 17 namespace ui { | 21 namespace ui { |
| 18 | 22 |
| 19 // An OutputSurface implementation that directly draws and | 23 // An OutputSurface implementation that directly draws and |
| 20 // swaps to an actual GL surface. | 24 // swaps to an actual GL surface. |
| 21 class DisplayOutputSurface : public cc::OutputSurface { | 25 class DisplayOutputSurface : public cc::OutputSurface { |
| 22 public: | 26 public: |
| 23 DisplayOutputSurface( | 27 DisplayOutputSurface( |
| 24 scoped_refptr<cc::InProcessContextProvider> context_provider, | 28 scoped_refptr<cc::InProcessContextProvider> context_provider, |
| 25 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source); | 29 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source); |
| 26 ~DisplayOutputSurface() override; | 30 ~DisplayOutputSurface() override; |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 54 private: | 58 private: |
| 55 // Called when a swap completion is signaled from ImageTransportSurface. | 59 // Called when a swap completion is signaled from ImageTransportSurface. |
| 56 void OnGpuSwapBuffersCompleted( | 60 void OnGpuSwapBuffersCompleted( |
| 57 const std::vector<ui::LatencyInfo>& latency_info, | 61 const std::vector<ui::LatencyInfo>& latency_info, |
| 58 gfx::SwapResult result, | 62 gfx::SwapResult result, |
| 59 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac); | 63 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac); |
| 60 void OnVSyncParametersUpdated(base::TimeTicks timebase, | 64 void OnVSyncParametersUpdated(base::TimeTicks timebase, |
| 61 base::TimeDelta interval); | 65 base::TimeDelta interval); |
| 62 | 66 |
| 63 cc::OutputSurfaceClient* client_ = nullptr; | 67 cc::OutputSurfaceClient* client_ = nullptr; |
| 68 gpu::InProcessCommandBuffer* in_process_command_buffer_ = nullptr; | |
|
mfomitchev
2017/03/23 15:25:17
Is this ok?
Fady Samuel
2017/03/23 17:24:38
Plumb LatencyInfo in instead?
| |
| 64 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; | 69 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; |
| 70 std::unique_ptr<latency_tracker::LatencyTracker> latency_tracker_; | |
| 71 | |
| 65 bool set_draw_rectangle_for_frame_ = false; | 72 bool set_draw_rectangle_for_frame_ = false; |
| 66 // True if the draw rectangle has been set at all since the last resize. | 73 // True if the draw rectangle has been set at all since the last resize. |
| 67 bool has_set_draw_rectangle_since_last_resize_ = false; | 74 bool has_set_draw_rectangle_since_last_resize_ = false; |
| 68 gfx::Size size_; | 75 gfx::Size size_; |
| 69 | 76 |
| 70 base::WeakPtrFactory<DisplayOutputSurface> weak_ptr_factory_; | 77 base::WeakPtrFactory<DisplayOutputSurface> weak_ptr_factory_; |
| 71 }; | 78 }; |
| 72 | 79 |
| 73 } // namespace ui | 80 } // namespace ui |
| 74 | 81 |
| 75 #endif // SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ | 82 #endif // SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ |
| OLD | NEW |