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