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