| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 46 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 47 uint32_t target, | 47 uint32_t target, |
| 48 uint32_t internalformat); | 48 uint32_t internalformat); |
| 49 | 49 |
| 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; |
| 57 void EnsureBackbuffer() override; |
| 58 void DiscardBackbuffer() override; |
| 59 void BindFramebuffer() override; |
| 56 void SwapBuffers(cc::CompositorFrame frame) override; | 60 void SwapBuffers(cc::CompositorFrame frame) override; |
| 57 void BindFramebuffer() override; | |
| 58 uint32_t GetFramebufferCopyTextureFormat() override; | 61 uint32_t GetFramebufferCopyTextureFormat() override; |
| 59 void Reshape(const gfx::Size& size, | 62 void Reshape(const gfx::Size& size, |
| 60 float scale_factor, | 63 float scale_factor, |
| 61 const gfx::ColorSpace& color_space, | 64 const gfx::ColorSpace& color_space, |
| 62 bool alpha) override; | 65 bool alpha) override; |
| 66 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; |
| 63 bool IsDisplayedAsOverlayPlane() const override; | 67 bool IsDisplayedAsOverlayPlane() const override; |
| 64 unsigned GetOverlayTextureId() const override; | 68 unsigned GetOverlayTextureId() const override; |
| 65 bool BindToClient(cc::OutputSurfaceClient* client) override; | 69 bool SurfaceIsSuspendForRecycle() const override; |
| 70 bool HasExternalStencilTest() const override; |
| 71 void ApplyExternalStencil() override; |
| 66 | 72 |
| 67 // Taken from BrowserCompositor specific API. | 73 // Taken from BrowserCompositor specific API. |
| 68 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, | 74 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, |
| 69 base::TimeDelta interval); | 75 base::TimeDelta interval); |
| 70 | 76 |
| 71 // Called when a swap completion is sent from the GPU process. | 77 // Called when a swap completion is sent from the GPU process. |
| 72 void OnGpuSwapBuffersCompleted(gfx::SwapResult result); | 78 void OnGpuSwapBuffersCompleted(gfx::SwapResult result); |
| 73 | 79 |
| 74 display_compositor::GLHelper gl_helper_; | 80 display_compositor::GLHelper gl_helper_; |
| 75 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_; | 81 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_; |
| 76 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; | 82 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; |
| 77 | 83 |
| 78 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; | 84 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; |
| 79 }; | 85 }; |
| 80 | 86 |
| 81 } // namespace ui | 87 } // namespace ui |
| 82 | 88 |
| 83 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ | 89 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ |
| OLD | NEW |