| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H
_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H
_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H
_ | 6 #define CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H
_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 ~OffscreenBrowserCompositorOutputSurface() override; | 34 ~OffscreenBrowserCompositorOutputSurface() override; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 // cc::OutputSurface implementation. | 37 // cc::OutputSurface implementation. |
| 38 void BindToClient(cc::OutputSurfaceClient* client) override; | 38 void BindToClient(cc::OutputSurfaceClient* client) override; |
| 39 void EnsureBackbuffer() override; | 39 void EnsureBackbuffer() override; |
| 40 void DiscardBackbuffer() override; | 40 void DiscardBackbuffer() override; |
| 41 void Reshape(const gfx::Size& size, | 41 void Reshape(const gfx::Size& size, |
| 42 float scale_factor, | 42 float scale_factor, |
| 43 const gfx::ColorSpace& color_space, | 43 const gfx::ColorSpace& color_space, |
| 44 bool alpha) override; | 44 bool alpha, |
| 45 bool stencil) override; |
| 45 void BindFramebuffer() override; | 46 void BindFramebuffer() override; |
| 46 void SwapBuffers(cc::OutputSurfaceFrame frame) override; | 47 void SwapBuffers(cc::OutputSurfaceFrame frame) override; |
| 47 bool IsDisplayedAsOverlayPlane() const override; | 48 bool IsDisplayedAsOverlayPlane() const override; |
| 48 unsigned GetOverlayTextureId() const override; | 49 unsigned GetOverlayTextureId() const override; |
| 49 bool SurfaceIsSuspendForRecycle() const override; | 50 bool SurfaceIsSuspendForRecycle() const override; |
| 50 uint32_t GetFramebufferCopyTextureFormat() override; | 51 uint32_t GetFramebufferCopyTextureFormat() override; |
| 51 | 52 |
| 52 // BrowserCompositorOutputSurface implementation. | 53 // BrowserCompositorOutputSurface implementation. |
| 53 void OnReflectorChanged() override; | 54 void OnReflectorChanged() override; |
| 54 #if defined(OS_MACOSX) | 55 #if defined(OS_MACOSX) |
| 55 void SetSurfaceSuspendedForRecycle(bool suspended) override {}; | 56 void SetSurfaceSuspendedForRecycle(bool suspended) override {}; |
| 56 #endif | 57 #endif |
| 57 | 58 |
| 58 void OnSwapBuffersComplete(); | 59 void OnSwapBuffersComplete(); |
| 59 | 60 |
| 60 cc::OutputSurfaceClient* client_ = nullptr; | 61 cc::OutputSurfaceClient* client_ = nullptr; |
| 61 gfx::Size reshape_size_; | 62 gfx::Size reshape_size_; |
| 62 uint32_t fbo_ = 0; | 63 uint32_t fbo_ = 0; |
| 63 bool reflector_changed_ = false; | 64 bool reflector_changed_ = false; |
| 64 std::unique_ptr<ReflectorTexture> reflector_texture_; | 65 std::unique_ptr<ReflectorTexture> reflector_texture_; |
| 65 base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface> | 66 base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface> |
| 66 weak_ptr_factory_; | 67 weak_ptr_factory_; |
| 67 | 68 |
| 68 DISALLOW_COPY_AND_ASSIGN(OffscreenBrowserCompositorOutputSurface); | 69 DISALLOW_COPY_AND_ASSIGN(OffscreenBrowserCompositorOutputSurface); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace content | 72 } // namespace content |
| 72 | 73 |
| 73 #endif // CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFAC
E_H_ | 74 #endif // CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFAC
E_H_ |
| OLD | NEW |