blob: 4138d9171a9be3081d09140b285b17b02e708b38 [file] [log] [blame]
[email protected]8705654b2014-05-24 01:16:191// 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
boliu0ed4f652016-01-09 00:07:268#include "android_webview/browser/scoped_app_gl_state_restore.h"
avide7d5c22015-12-20 05:48:449#include "base/macros.h"
[email protected]8705654b2014-05-24 01:16:1910#include "cc/output/output_surface.h"
11
12namespace android_webview {
danakja85bd242016-06-22 22:25:4913class AwRenderThreadContextProvider;
[email protected]8705654b2014-05-24 01:16:1914
15class ParentOutputSurface : NON_EXPORTED_BASE(public cc::OutputSurface) {
16 public:
17 explicit ParentOutputSurface(
danakja85bd242016-06-22 22:25:4918 scoped_refptr<AwRenderThreadContextProvider> context_provider);
dcheng996c125c2015-02-04 02:25:4919 ~ParentOutputSurface() override;
[email protected]8705654b2014-05-24 01:16:1920
21 // OutputSurface overrides.
boliub3547242016-01-04 21:24:1922 void DidLoseOutputSurface() override;
jbauman7064ae372015-12-15 21:21:0223 void Reshape(const gfx::Size& size,
24 float scale_factor,
25 bool has_alpha) override;
fsamueld63137a2016-06-24 23:39:5126 void SwapBuffers(cc::CompositorFrame frame) override;
boliu0ed4f652016-01-09 00:07:2627 void ApplyExternalStencil() override;
danakja85bd242016-06-22 22:25:4928 uint32_t GetFramebufferCopyTextureFormat() override;
boliu0ed4f652016-01-09 00:07:2629
30 void SetGLState(const ScopedAppGLStateRestore& gl_state);
[email protected]8705654b2014-05-24 01:16:1931
[email protected]8705654b2014-05-24 01:16:1932 private:
boliu0ed4f652016-01-09 00:07:2633 StencilState stencil_state_;
34
[email protected]8705654b2014-05-24 01:16:1935 DISALLOW_COPY_AND_ASSIGN(ParentOutputSurface);
36};
37
38} // namespace android_webview
39
40#endif // ANDROID_WEBVIEW_BROWSER_PARENT_OUTPUT_SURFACE_H_