| 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 CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #endif | 61 #endif |
| 62 | 62 |
| 63 // cc::OutputSurface implementation. | 63 // cc::OutputSurface implementation. |
| 64 void BindToClient(cc::OutputSurfaceClient* client) override; | 64 void BindToClient(cc::OutputSurfaceClient* client) override; |
| 65 void EnsureBackbuffer() override; | 65 void EnsureBackbuffer() override; |
| 66 void DiscardBackbuffer() override; | 66 void DiscardBackbuffer() override; |
| 67 void BindFramebuffer() override; | 67 void BindFramebuffer() override; |
| 68 void Reshape(const gfx::Size& size, | 68 void Reshape(const gfx::Size& size, |
| 69 float device_scale_factor, | 69 float device_scale_factor, |
| 70 const gfx::ColorSpace& color_space, | 70 const gfx::ColorSpace& color_space, |
| 71 bool has_alpha) override; | 71 bool has_alpha, |
| 72 bool use_stencil) override; |
| 72 void SwapBuffers(cc::OutputSurfaceFrame frame) override; | 73 void SwapBuffers(cc::OutputSurfaceFrame frame) override; |
| 73 uint32_t GetFramebufferCopyTextureFormat() override; | 74 uint32_t GetFramebufferCopyTextureFormat() override; |
| 74 bool IsDisplayedAsOverlayPlane() const override; | 75 bool IsDisplayedAsOverlayPlane() const override; |
| 75 unsigned GetOverlayTextureId() const override; | 76 unsigned GetOverlayTextureId() const override; |
| 76 bool SurfaceIsSuspendForRecycle() const override; | 77 bool SurfaceIsSuspendForRecycle() const override; |
| 77 | 78 |
| 78 protected: | 79 protected: |
| 79 gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); | 80 gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); |
| 80 | 81 |
| 81 cc::OutputSurfaceClient* client_ = nullptr; | 82 cc::OutputSurfaceClient* client_ = nullptr; |
| 82 std::unique_ptr<ReflectorTexture> reflector_texture_; | 83 std::unique_ptr<ReflectorTexture> reflector_texture_; |
| 83 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_; | 84 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_; |
| 84 | 85 |
| 85 private: | 86 private: |
| 86 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); | 87 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 } // namespace content | 90 } // namespace content |
| 90 | 91 |
| 91 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 92 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |