[email protected] | 8705654b | 2014-05-24 01:16:19 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_ | ||||
6 | #define ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_ | ||||
7 | |||||
boliu | 0ed4f65 | 2016-01-09 00:07:26 | [diff] [blame] | 8 | #include "android_webview/browser/scoped_app_gl_state_restore.h" |
avi | de7d5c2 | 2015-12-20 05:48:44 | [diff] [blame] | 9 | #include "base/macros.h" |
[email protected] | 8705654b | 2014-05-24 01:16:19 | [diff] [blame] | 10 | #include "cc/output/output_surface.h" |
11 | |||||
12 | namespace android_webview { | ||||
danakj | a85bd24 | 2016-06-22 22:25:49 | [diff] [blame] | 13 | class AwRenderThreadContextProvider; |
[email protected] | 8705654b | 2014-05-24 01:16:19 | [diff] [blame] | 14 | |
15 | class ParentOutputSurface : NON_EXPORTED_BASE(public cc::OutputSurface) { | ||||
16 | public: | ||||
17 | explicit ParentOutputSurface( | ||||
danakj | a85bd24 | 2016-06-22 22:25:49 | [diff] [blame] | 18 | scoped_refptr<AwRenderThreadContextProvider> context_provider); |
dcheng | 996c125c | 2015-02-04 02:25:49 | [diff] [blame] | 19 | ~ParentOutputSurface() override; |
[email protected] | 8705654b | 2014-05-24 01:16:19 | [diff] [blame] | 20 | |
21 | // OutputSurface overrides. | ||||
boliu | b354724 | 2016-01-04 21:24:19 | [diff] [blame] | 22 | void DidLoseOutputSurface() override; |
jbauman | 7064ae37 | 2015-12-15 21:21:02 | [diff] [blame] | 23 | void Reshape(const gfx::Size& size, |
24 | float scale_factor, | ||||
25 | bool has_alpha) override; | ||||
fsamuel | d63137a | 2016-06-24 23:39:51 | [diff] [blame^] | 26 | void SwapBuffers(cc::CompositorFrame frame) override; |
boliu | 0ed4f65 | 2016-01-09 00:07:26 | [diff] [blame] | 27 | void ApplyExternalStencil() override; |
danakj | a85bd24 | 2016-06-22 22:25:49 | [diff] [blame] | 28 | uint32_t GetFramebufferCopyTextureFormat() override; |
boliu | 0ed4f65 | 2016-01-09 00:07:26 | [diff] [blame] | 29 | |
30 | void SetGLState(const ScopedAppGLStateRestore& gl_state); | ||||
[email protected] | 8705654b | 2014-05-24 01:16:19 | [diff] [blame] | 31 | |
[email protected] | 8705654b | 2014-05-24 01:16:19 | [diff] [blame] | 32 | private: |
boliu | 0ed4f65 | 2016-01-09 00:07:26 | [diff] [blame] | 33 | StencilState stencil_state_; |
34 | |||||
[email protected] | 8705654b | 2014-05-24 01:16:19 | [diff] [blame] | 35 | DISALLOW_COPY_AND_ASSIGN(ParentOutputSurface); |
36 | }; | ||||
37 | |||||
38 | } // namespace android_webview | ||||
39 | |||||
40 | #endif // ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_ |