| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 ~DirectOutputSurfaceOzone() override; | 50 ~DirectOutputSurfaceOzone() override; |
| 51 | 51 |
| 52 // TODO(rjkroege): Implement the equivalent of Reflector. | 52 // TODO(rjkroege): Implement the equivalent of Reflector. |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 // cc::OutputSurface implementation. | 55 // cc::OutputSurface implementation. |
| 56 bool BindToClient(cc::OutputSurfaceClient* client) override; | 56 bool BindToClient(cc::OutputSurfaceClient* client) override; |
| 57 void EnsureBackbuffer() override; | 57 void EnsureBackbuffer() override; |
| 58 void DiscardBackbuffer() override; | 58 void DiscardBackbuffer() override; |
| 59 void BindFramebuffer() override; | 59 void BindFramebuffer() override; |
| 60 void Reshape(const gfx::Size& size, |
| 61 float device_scale_factor, |
| 62 const gfx::ColorSpace& color_space, |
| 63 bool has_alpha) override; |
| 60 void SwapBuffers(cc::OutputSurfaceFrame frame) override; | 64 void SwapBuffers(cc::OutputSurfaceFrame frame) override; |
| 61 uint32_t GetFramebufferCopyTextureFormat() override; | 65 uint32_t GetFramebufferCopyTextureFormat() override; |
| 62 void Reshape(const gfx::Size& size, | |
| 63 float scale_factor, | |
| 64 const gfx::ColorSpace& color_space, | |
| 65 bool alpha) override; | |
| 66 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; | 66 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; |
| 67 bool IsDisplayedAsOverlayPlane() const override; | 67 bool IsDisplayedAsOverlayPlane() const override; |
| 68 unsigned GetOverlayTextureId() const override; | 68 unsigned GetOverlayTextureId() const override; |
| 69 bool SurfaceIsSuspendForRecycle() const override; | 69 bool SurfaceIsSuspendForRecycle() const override; |
| 70 bool HasExternalStencilTest() const override; | 70 bool HasExternalStencilTest() const override; |
| 71 void ApplyExternalStencil() override; | 71 void ApplyExternalStencil() override; |
| 72 | 72 |
| 73 // Taken from BrowserCompositor specific API. | 73 // Taken from BrowserCompositor specific API. |
| 74 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, | 74 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, |
| 75 base::TimeDelta interval); | 75 base::TimeDelta interval); |
| 76 | 76 |
| 77 // Called when a swap completion is sent from the GPU process. | 77 // Called when a swap completion is sent from the GPU process. |
| 78 void OnGpuSwapBuffersCompleted(gfx::SwapResult result); | 78 void OnGpuSwapBuffersCompleted(gfx::SwapResult result); |
| 79 | 79 |
| 80 display_compositor::GLHelper gl_helper_; | 80 display_compositor::GLHelper gl_helper_; |
| 81 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_; | 81 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_; |
| 82 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; | 82 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; |
| 83 | 83 |
| 84 gfx::Size reshape_size_; | 84 gfx::Size reshape_size_; |
| 85 gfx::Size swap_size_; | 85 gfx::Size swap_size_; |
| 86 | 86 |
| 87 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; | 87 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace ui | 90 } // namespace ui |
| 91 | 91 |
| 92 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ | 92 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ |
| OLD | NEW |