| Index: android_webview/browser/scoped_app_gl_state_restore.h
|
| diff --git a/android_webview/browser/scoped_app_gl_state_restore.h b/android_webview/browser/scoped_app_gl_state_restore.h
|
| index 299d43bf31b7b4829ebb8d732027a7d3b489464d..b6d59c9f86da2657c4c1a6327d75969a72c7e8f0 100644
|
| --- a/android_webview/browser/scoped_app_gl_state_restore.h
|
| +++ b/android_webview/browser/scoped_app_gl_state_restore.h
|
| @@ -5,7 +5,7 @@
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
| -#include "ui/gl/gl_bindings.h"
|
| +#include "base/memory/scoped_ptr.h"
|
|
|
| namespace gfx {
|
| class GLContext;
|
| @@ -13,6 +13,10 @@ class GLContext;
|
|
|
| namespace android_webview {
|
|
|
| +namespace internal {
|
| +class ScopedAppGLStateRestoreImpl;
|
| +}
|
| +
|
| // This class is not thread safe and should only be used on the UI thread.
|
| class ScopedAppGLStateRestore {
|
| public:
|
| @@ -24,80 +28,11 @@ class ScopedAppGLStateRestore {
|
| ScopedAppGLStateRestore(CallMode mode);
|
| ~ScopedAppGLStateRestore();
|
|
|
| - bool stencil_enabled() const { return stencil_test_; }
|
| - GLint framebuffer_binding_ext() const { return framebuffer_binding_ext_; }
|
| + bool stencil_enabled() const;
|
| + int framebuffer_binding_ext() const;
|
|
|
| private:
|
| - const CallMode mode_;
|
| -
|
| - GLint pack_alignment_;
|
| - GLint unpack_alignment_;
|
| -
|
| - struct {
|
| - GLint enabled;
|
| - GLint size;
|
| - GLint type;
|
| - GLint normalized;
|
| - GLint stride;
|
| - GLvoid* pointer;
|
| - GLint vertex_attrib_array_buffer_binding;
|
| - GLfloat current_vertex_attrib[4];
|
| - } vertex_attrib_[3];
|
| -
|
| - GLint vertex_array_buffer_binding_;
|
| - GLint index_array_buffer_binding_;
|
| -
|
| - GLboolean depth_test_;
|
| - GLboolean cull_face_;
|
| - GLint cull_face_mode_;
|
| - GLboolean color_mask_[4];
|
| - GLfloat color_clear_[4];
|
| - GLfloat depth_clear_;
|
| - GLint current_program_;
|
| - GLint depth_func_;
|
| - GLboolean depth_mask_;
|
| - GLfloat depth_rage_[2];
|
| - GLint front_face_;
|
| - GLint hint_generate_mipmap_;
|
| - GLfloat line_width_;
|
| - GLfloat polygon_offset_factor_;
|
| - GLfloat polygon_offset_units_;
|
| - GLfloat sample_coverage_value_;
|
| - GLboolean sample_coverage_invert_;
|
| -
|
| - GLboolean enable_dither_;
|
| - GLboolean enable_polygon_offset_fill_;
|
| - GLboolean enable_sample_alpha_to_coverage_;
|
| - GLboolean enable_sample_coverage_;
|
| -
|
| - // Not saved/restored in MODE_DRAW.
|
| - GLboolean blend_enabled_;
|
| - GLint blend_src_rgb_;
|
| - GLint blend_src_alpha_;
|
| - GLint blend_dest_rgb_;
|
| - GLint blend_dest_alpha_;
|
| - GLint active_texture_;
|
| - GLint viewport_[4];
|
| - GLboolean scissor_test_;
|
| - GLint scissor_box_[4];
|
| -
|
| - GLboolean stencil_test_;
|
| - GLint stencil_func_;
|
| - GLint stencil_mask_;
|
| - GLint stencil_ref_;
|
| -
|
| - GLint framebuffer_binding_ext_;
|
| -
|
| - struct TextureBindings {
|
| - GLint texture_2d;
|
| - GLint texture_cube_map;
|
| - GLint texture_external_oes;
|
| - // TODO(boliu): TEXTURE_RECTANGLE_ARB
|
| - };
|
| -
|
| - std::vector<TextureBindings> texture_bindings_;
|
| -
|
| - GLint vertex_array_bindings_oes_;
|
| + scoped_ptr<internal::ScopedAppGLStateRestoreImpl> impl_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore);
|
| };
|
|
|