| Index: cc/test/test_web_graphics_context_3d.h
|
| diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h
|
| index 796e34d7f86cdc7fabaa9f0175cd34f1f2d2e357..9502906a9426de41d94a9de3f860b513b3511d8e 100644
|
| --- a/cc/test/test_web_graphics_context_3d.h
|
| +++ b/cc/test/test_web_graphics_context_3d.h
|
| @@ -20,6 +20,7 @@
|
| #include "cc/test/ordered_texture_map.h"
|
| #include "cc/test/test_texture.h"
|
| #include "third_party/khronos/GLES2/gl2.h"
|
| +#include "ui/gfx/rect.h"
|
|
|
| namespace cc {
|
| class TestContextSupport;
|
| @@ -123,7 +124,11 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
|
| virtual void setSwapBuffersCompleteCallbackCHROMIUM(
|
| WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* callback);
|
|
|
| + virtual void enable(GLenum cap);
|
| + virtual void disable(GLenum cap);
|
| +
|
| virtual void prepareTexture();
|
| + virtual void postSubBufferCHROMIUM(int x, int y, int width, int height);
|
| virtual void finish();
|
| virtual void flush();
|
|
|
| @@ -227,6 +232,24 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
|
| test_support_ = test_support;
|
| }
|
|
|
| + int width() const { return width_; }
|
| + int height() const { return height_; }
|
| + bool reshape_called() const { return reshape_called_; }
|
| + void clear_reshape_called() { reshape_called_ = false; }
|
| + float scale_factor() const { return scale_factor_; }
|
| +
|
| + enum UpdateType {
|
| + NoUpdate = 0,
|
| + PrepareTexture,
|
| + PostSubBuffer
|
| + };
|
| +
|
| + gfx::Rect update_rect() const { return update_rect_; }
|
| +
|
| + UpdateType last_update_type() {
|
| + return last_update_type_;
|
| + }
|
| +
|
| protected:
|
| struct TextureTargets {
|
| TextureTargets();
|
| @@ -301,12 +324,20 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
|
| int times_map_buffer_chromium_succeeds_;
|
| WebGraphicsContextLostCallback* context_lost_callback_;
|
| WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* swap_buffers_callback_;
|
| - base::hash_set<WebKit::WebGLId> used_textures_;
|
| + base::hash_set<unsigned> used_textures_;
|
| + unsigned next_program_id_;
|
| + base::hash_set<unsigned> program_set_;
|
| + unsigned next_shader_id_;
|
| + base::hash_set<unsigned> shader_set_;
|
| std::vector<WebKit::WebGraphicsContext3D*> shared_contexts_;
|
| int max_texture_size_;
|
| + bool reshape_called_;
|
| int width_;
|
| int height_;
|
| + float scale_factor_;
|
| TestContextSupport* test_support_;
|
| + gfx::Rect update_rect_;
|
| + UpdateType last_update_type_;
|
|
|
| unsigned bound_buffer_;
|
| TextureTargets texture_targets_;
|
|
|