Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: android_webview/browser/scoped_app_gl_state_restore.h

Issue 1564703005: Implement external stencil for Android WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix pixel tests Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include <vector> 5 #include <vector>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 class GLContext; 11 class GLContext;
12 } 12 }
13 13
14 namespace android_webview { 14 namespace android_webview {
15 15
16 namespace internal { 16 namespace internal {
17 class ScopedAppGLStateRestoreImpl; 17 class ScopedAppGLStateRestoreImpl;
18 } 18 }
19 19
20 struct StencilState {
21 unsigned char stencil_test_enabled;
22 int stencil_front_func;
23 int stencil_front_ref;
24 int stencil_front_mask;
25 int stencil_back_func;
26 int stencil_back_ref;
27 int stencil_back_mask;
28 int stencil_clear;
29 int stencil_front_writemask;
30 int stencil_back_writemask;
31 int stencil_front_fail_op;
32 int stencil_front_z_fail_op;
33 int stencil_front_z_pass_op;
34 int stencil_back_fail_op;
35 int stencil_back_z_fail_op;
36 int stencil_back_z_pass_op;
37 };
38
20 // This class is not thread safe and should only be used on the UI thread. 39 // This class is not thread safe and should only be used on the UI thread.
21 class ScopedAppGLStateRestore { 40 class ScopedAppGLStateRestore {
22 public: 41 public:
23 enum CallMode { 42 enum CallMode {
24 MODE_DRAW, 43 MODE_DRAW,
25 MODE_RESOURCE_MANAGEMENT, 44 MODE_RESOURCE_MANAGEMENT,
26 }; 45 };
27 46
28 explicit ScopedAppGLStateRestore(CallMode mode); 47 explicit ScopedAppGLStateRestore(CallMode mode);
29 ~ScopedAppGLStateRestore(); 48 ~ScopedAppGLStateRestore();
30 49
31 bool stencil_enabled() const; 50 StencilState stencil_state() const;
32 int framebuffer_binding_ext() const; 51 int framebuffer_binding_ext() const;
33 52
34 private: 53 private:
35 scoped_ptr<internal::ScopedAppGLStateRestoreImpl> impl_; 54 scoped_ptr<internal::ScopedAppGLStateRestoreImpl> impl_;
36 55
37 DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore); 56 DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore);
38 }; 57 };
39 58
40 } // namespace android_webview 59 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/parent_output_surface.cc ('k') | android_webview/browser/scoped_app_gl_state_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698