| 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_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ | 5 #ifndef SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ |
| 6 #define SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ | 6 #define SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 bool has_alpha) override; | 62 bool has_alpha) override; |
| 63 void SwapBuffers(cc::OutputSurfaceFrame frame) override; | 63 void SwapBuffers(cc::OutputSurfaceFrame frame) override; |
| 64 uint32_t GetFramebufferCopyTextureFormat() override; | 64 uint32_t GetFramebufferCopyTextureFormat() override; |
| 65 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; | 65 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; |
| 66 bool IsDisplayedAsOverlayPlane() const override; | 66 bool IsDisplayedAsOverlayPlane() const override; |
| 67 unsigned GetOverlayTextureId() const override; | 67 unsigned GetOverlayTextureId() const override; |
| 68 bool SurfaceIsSuspendForRecycle() const override; | 68 bool SurfaceIsSuspendForRecycle() const override; |
| 69 bool HasExternalStencilTest() const override; | 69 bool HasExternalStencilTest() const override; |
| 70 void ApplyExternalStencil() override; | 70 void ApplyExternalStencil() override; |
| 71 | 71 |
| 72 // Taken from BrowserCompositor specific API. | |
| 73 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, | |
| 74 base::TimeDelta interval); | |
| 75 | |
| 76 // Called when a swap completion is signaled from ImageTransportSurface. | 72 // Called when a swap completion is signaled from ImageTransportSurface. |
| 77 void OnGpuSwapBuffersCompleted( | 73 void OnGpuSwapBuffersCompleted( |
| 78 const std::vector<ui::LatencyInfo>& latency_info, | 74 const std::vector<ui::LatencyInfo>& latency_info, |
| 79 gfx::SwapResult result, | 75 gfx::SwapResult result, |
| 80 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac); | 76 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac); |
| 77 void OnVSyncParametersUpdated(base::TimeTicks timebase, |
| 78 base::TimeDelta interval); |
| 81 | 79 |
| 82 cc::OutputSurfaceClient* client_ = nullptr; | 80 cc::OutputSurfaceClient* client_ = nullptr; |
| 83 | 81 |
| 84 display_compositor::GLHelper gl_helper_; | 82 display_compositor::GLHelper gl_helper_; |
| 85 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_; | 83 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_; |
| 86 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; | 84 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; |
| 87 | 85 |
| 88 gfx::Size reshape_size_; | 86 gfx::Size reshape_size_; |
| 89 gfx::Size swap_size_; | 87 gfx::Size swap_size_; |
| 90 | 88 |
| 91 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; | 89 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; |
| 92 }; | 90 }; |
| 93 | 91 |
| 94 } // namespace ui | 92 } // namespace ui |
| 95 | 93 |
| 96 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ | 94 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ |
| OLD | NEW |