| 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 ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/output/output_surface.h" | 9 #include "cc/output/output_surface.h" |
| 10 | 10 |
| 11 namespace android_webview { | 11 namespace android_webview { |
| 12 class AwRenderThreadContextProvider; | 12 class AwRenderThreadContextProvider; |
| 13 | 13 |
| 14 class ParentOutputSurface : NON_EXPORTED_BASE(public cc::OutputSurface) { | 14 class ParentOutputSurface : NON_EXPORTED_BASE(public cc::OutputSurface) { |
| 15 public: | 15 public: |
| 16 explicit ParentOutputSurface( | 16 explicit ParentOutputSurface( |
| 17 scoped_refptr<AwRenderThreadContextProvider> context_provider); | 17 scoped_refptr<AwRenderThreadContextProvider> context_provider); |
| 18 ~ParentOutputSurface() override; | 18 ~ParentOutputSurface() override; |
| 19 | 19 |
| 20 // OutputSurface overrides. | 20 // OutputSurface overrides. |
| 21 void DidLoseOutputSurface() override; | 21 void BindToClient(cc::OutputSurfaceClient* client) override; |
| 22 void EnsureBackbuffer() override; | 22 void EnsureBackbuffer() override; |
| 23 void DiscardBackbuffer() override; | 23 void DiscardBackbuffer() override; |
| 24 void BindFramebuffer() override; | 24 void BindFramebuffer() override; |
| 25 void Reshape(const gfx::Size& size, | 25 void Reshape(const gfx::Size& size, |
| 26 float scale_factor, | 26 float scale_factor, |
| 27 const gfx::ColorSpace& color_space, | 27 const gfx::ColorSpace& color_space, |
| 28 bool has_alpha) override; | 28 bool has_alpha) override; |
| 29 void SwapBuffers(cc::OutputSurfaceFrame frame) override; | 29 void SwapBuffers(cc::OutputSurfaceFrame frame) override; |
| 30 bool HasExternalStencilTest() const override; | 30 bool HasExternalStencilTest() const override; |
| 31 void ApplyExternalStencil() override; | 31 void ApplyExternalStencil() override; |
| 32 uint32_t GetFramebufferCopyTextureFormat() override; | 32 uint32_t GetFramebufferCopyTextureFormat() override; |
| 33 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; | 33 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; |
| 34 bool IsDisplayedAsOverlayPlane() const override; | 34 bool IsDisplayedAsOverlayPlane() const override; |
| 35 unsigned GetOverlayTextureId() const override; | 35 unsigned GetOverlayTextureId() const override; |
| 36 bool SurfaceIsSuspendForRecycle() const override; | 36 bool SurfaceIsSuspendForRecycle() const override; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 DISALLOW_COPY_AND_ASSIGN(ParentOutputSurface); | 39 DISALLOW_COPY_AND_ASSIGN(ParentOutputSurface); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace android_webview | 42 } // namespace android_webview |
| 43 | 43 |
| 44 #endif // ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_ | 44 #endif // ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_ |
| OLD | NEW |