summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-13 19:31:05 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-13 19:31:05 +0000
commit95fc42145e5a8cdb0c7624060bf5bfd298838e19 (patch)
tree2b9a293e6581a60afbe69fe32177cf2b73704b9e
parent14ac682365925234f1f7bc3572f185b69f798814 (diff)
downloadchromium_src-95fc42145e5a8cdb0c7624060bf5bfd298838e19.zip
chromium_src-95fc42145e5a8cdb0c7624060bf5bfd298838e19.tar.gz
chromium_src-95fc42145e5a8cdb0c7624060bf5bfd298838e19.tar.bz2
aura,cc: Make TestContextProvider usable outside cc.
This makes the TestWebGraphicsContext3D available outside of cc, and replaces ui::TestWGC3D with the class from cc. R=jbauman, piman BUG=258625 Review URL: https://chromiumcodereview.appspot.com/22293007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217308 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/cc.gyp2
-rw-r--r--cc/cc_tests.gyp2
-rw-r--r--cc/debug/test_web_graphics_context_3d.cc (renamed from cc/test/test_web_graphics_context_3d.cc)23
-rw-r--r--cc/debug/test_web_graphics_context_3d.h (renamed from cc/test/test_web_graphics_context_3d.h)16
-rw-r--r--cc/layers/delegated_renderer_layer_impl_unittest.cc2
-rw-r--r--cc/layers/scrollbar_layer_unittest.cc2
-rw-r--r--cc/layers/texture_layer_unittest.cc2
-rw-r--r--cc/output/gl_renderer_unittest.cc2
-rw-r--r--cc/output/output_surface_unittest.cc2
-rw-r--r--cc/resources/resource_provider_unittest.cc2
-rw-r--r--cc/resources/resource_update_controller_unittest.cc2
-rw-r--r--cc/resources/video_resource_updater_unittest.cc2
-rw-r--r--cc/scheduler/texture_uploader_unittest.cc2
-rw-r--r--cc/test/fake_layer_tree_host_client.cc2
-rw-r--r--cc/test/fake_output_surface.h2
-rw-r--r--cc/test/fake_web_graphics_context_3d_unittest.cc2
-rw-r--r--cc/trees/layer_tree_host_impl_unittest.cc2
-rw-r--r--cc/trees/layer_tree_host_unittest_context.cc2
-rw-r--r--ui/compositor/compositor.cc19
-rw-r--r--ui/compositor/compositor.gyp3
-rw-r--r--ui/compositor/compositor.h4
-rw-r--r--ui/compositor/test_web_graphics_context_3d.cc220
-rw-r--r--ui/compositor/test_web_graphics_context_3d.h450
23 files changed, 41 insertions, 726 deletions
diff --git a/cc/cc.gyp b/cc/cc.gyp
index 11353ff..5a2f405 100644
--- a/cc/cc.gyp
+++ b/cc/cc.gyp
@@ -88,6 +88,8 @@
'debug/rendering_stats_instrumentation.cc',
'debug/rendering_stats_instrumentation.h',
'debug/ring_buffer.h',
+ 'debug/test_web_graphics_context_3d.cc',
+ 'debug/test_web_graphics_context_3d.h',
'debug/traced_picture.cc',
'debug/traced_picture.h',
'debug/traced_value.cc',
diff --git a/cc/cc_tests.gyp b/cc/cc_tests.gyp
index 7256836..4e4f438 100644
--- a/cc/cc_tests.gyp
+++ b/cc/cc_tests.gyp
@@ -172,8 +172,6 @@
'test/skia_common.h',
'test/test_tile_priorities.cc',
'test/test_tile_priorities.h',
- 'test/test_web_graphics_context_3d.cc',
- 'test/test_web_graphics_context_3d.h',
'test/tiled_layer_test_common.cc',
'test/tiled_layer_test_common.h',
],
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/debug/test_web_graphics_context_3d.cc
index e68f938..b0f1847 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/debug/test_web_graphics_context_3d.cc
@@ -1,8 +1,8 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "cc/test/test_web_graphics_context_3d.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include <algorithm>
#include <string>
@@ -12,7 +12,6 @@
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "gpu/GLES2/gl2extchromium.h"
-#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/khronos/GLES2/gl2ext.h"
using WebKit::WGC3Dboolean;
@@ -274,7 +273,7 @@ WebGLId TestWebGraphicsContext3D::createFramebuffer() {
}
void TestWebGraphicsContext3D::deleteFramebuffer(WebGLId id) {
- EXPECT_EQ(kFramebufferId | context_id_ << 16, id);
+ DCHECK_EQ(kFramebufferId | context_id_ << 16, id);
}
WebGLId TestWebGraphicsContext3D::createProgram() {
@@ -282,7 +281,7 @@ WebGLId TestWebGraphicsContext3D::createProgram() {
}
void TestWebGraphicsContext3D::deleteProgram(WebGLId id) {
- EXPECT_EQ(kProgramId | context_id_ << 16, id);
+ DCHECK_EQ(kProgramId | context_id_ << 16, id);
}
WebGLId TestWebGraphicsContext3D::createRenderbuffer() {
@@ -290,7 +289,7 @@ WebGLId TestWebGraphicsContext3D::createRenderbuffer() {
}
void TestWebGraphicsContext3D::deleteRenderbuffer(WebGLId id) {
- EXPECT_EQ(kRenderbufferId | context_id_ << 16, id);
+ DCHECK_EQ(kRenderbufferId | context_id_ << 16, id);
}
WebGLId TestWebGraphicsContext3D::createShader(WGC3Denum) {
@@ -298,7 +297,7 @@ WebGLId TestWebGraphicsContext3D::createShader(WGC3Denum) {
}
void TestWebGraphicsContext3D::deleteShader(WebGLId id) {
- EXPECT_EQ(kShaderId | context_id_ << 16, id);
+ DCHECK_EQ(kShaderId | context_id_ << 16, id);
}
WebGLId TestWebGraphicsContext3D::createTexture() {
@@ -318,28 +317,28 @@ void TestWebGraphicsContext3D::deleteTexture(WebGLId texture_id) {
}
void TestWebGraphicsContext3D::attachShader(WebGLId program, WebGLId shader) {
- EXPECT_EQ(kProgramId | context_id_ << 16, program);
- EXPECT_EQ(kShaderId | context_id_ << 16, shader);
+ DCHECK_EQ(kProgramId | context_id_ << 16, program);
+ DCHECK_EQ(kShaderId | context_id_ << 16, shader);
}
void TestWebGraphicsContext3D::useProgram(WebGLId program) {
if (!program)
return;
- EXPECT_EQ(kProgramId | context_id_ << 16, program);
+ DCHECK_EQ(kProgramId | context_id_ << 16, program);
}
void TestWebGraphicsContext3D::bindFramebuffer(
WGC3Denum target, WebGLId framebuffer) {
if (!framebuffer)
return;
- EXPECT_EQ(kFramebufferId | context_id_ << 16, framebuffer);
+ DCHECK_EQ(kFramebufferId | context_id_ << 16, framebuffer);
}
void TestWebGraphicsContext3D::bindRenderbuffer(
WGC3Denum target, WebGLId renderbuffer) {
if (!renderbuffer)
return;
- EXPECT_EQ(kRenderbufferId | context_id_ << 16, renderbuffer);
+ DCHECK_EQ(kRenderbufferId | context_id_ << 16, renderbuffer);
}
void TestWebGraphicsContext3D::bindTexture(
diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/debug/test_web_graphics_context_3d.h
index fb278ef..1415ea4 100644
--- a/cc/test/test_web_graphics_context_3d.h
+++ b/cc/debug/test_web_graphics_context_3d.h
@@ -1,9 +1,9 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
-#define CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
+#ifndef CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
+#define CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
#include <vector>
@@ -15,18 +15,16 @@
#include "base/memory/weak_ptr.h"
#include "base/stl_util.h"
#include "base/synchronization/lock.h"
+#include "cc/base/cc_export.h"
#include "cc/base/scoped_ptr_hash_map.h"
#include "cc/debug/fake_web_graphics_context_3d.h"
#include "third_party/khronos/GLES2/gl2.h"
-namespace WebKit {
-class WebGraphicsContext3D;
-struct WebGraphicsMemoryAllocation;
-}
+namespace WebKit { struct WebGraphicsMemoryAllocation; }
namespace cc {
-class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
+class CC_EXPORT TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
public:
static scoped_ptr<TestWebGraphicsContext3D> Create();
static base::Callback<
@@ -294,4 +292,4 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
} // namespace cc
-#endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
+#endif // CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc
index 1584782..2537c53 100644
--- a/cc/layers/delegated_renderer_layer_impl_unittest.cc
+++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc
@@ -5,6 +5,7 @@
#include "cc/layers/delegated_renderer_layer_impl.h"
#include "cc/base/scoped_ptr_vector.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/layers/append_quads_data.h"
#include "cc/layers/quad_sink.h"
#include "cc/layers/solid_color_layer_impl.h"
@@ -20,7 +21,6 @@
#include "cc/test/mock_quad_culler.h"
#include "cc/test/render_pass_test_common.h"
#include "cc/test/render_pass_test_utils.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/single_thread_proxy.h"
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index 0c160c4..962efa0 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -5,6 +5,7 @@
#include "cc/layers/scrollbar_layer.h"
#include "cc/animation/scrollbar_animation_controller.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/layers/append_quads_data.h"
#include "cc/layers/scrollbar_layer_impl.h"
#include "cc/quads/solid_color_draw_quad.h"
@@ -19,7 +20,6 @@
#include "cc/test/geometry_test_utils.h"
#include "cc/test/layer_tree_test.h"
#include "cc/test/mock_quad_culler.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/single_thread_proxy.h"
#include "cc/trees/tree_synchronizer.h"
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 1635591..744bf00 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/callback.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/layers/texture_layer_client.h"
#include "cc/layers/texture_layer_impl.h"
#include "cc/test/fake_impl_proxy.h"
@@ -15,7 +16,6 @@
#include "cc/test/fake_output_surface.h"
#include "cc/test/layer_test_common.h"
#include "cc/test/layer_tree_test.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/single_thread_proxy.h"
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index e4213d6..9e930cc 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -7,6 +7,7 @@
#include <set>
#include "cc/base/math_util.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/output/compositor_frame_metadata.h"
#include "cc/resources/prioritized_resource_manager.h"
#include "cc/resources/resource_provider.h"
@@ -18,7 +19,6 @@
#include "cc/test/pixel_test.h"
#include "cc/test/render_pass_test_common.h"
#include "cc/test/render_pass_test_utils.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/output/output_surface_unittest.cc b/cc/output/output_surface_unittest.cc
index 276828c..8dc7ca8 100644
--- a/cc/output/output_surface_unittest.cc
+++ b/cc/output/output_surface_unittest.cc
@@ -5,13 +5,13 @@
#include "cc/output/output_surface.h"
#include "base/test/test_simple_task_runner.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/output/managed_memory_policy.h"
#include "cc/output/output_surface_client.h"
#include "cc/output/software_output_device.h"
#include "cc/test/fake_output_surface.h"
#include "cc/test/fake_output_surface_client.h"
#include "cc/test/scheduler_test_common.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/WebGraphicsMemoryAllocation.h"
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index a23af0b..ad6b3d3 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -11,10 +11,10 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "cc/base/scoped_ptr_deque.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/output/output_surface.h"
#include "cc/test/fake_output_surface.h"
#include "cc/test/fake_output_surface_client.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/resources/resource_update_controller_unittest.cc b/cc/resources/resource_update_controller_unittest.cc
index 1060801..9dcb23c 100644
--- a/cc/resources/resource_update_controller_unittest.cc
+++ b/cc/resources/resource_update_controller_unittest.cc
@@ -5,11 +5,11 @@
#include "cc/resources/resource_update_controller.h"
#include "base/test/test_simple_task_runner.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/resources/prioritized_resource_manager.h"
#include "cc/test/fake_output_surface.h"
#include "cc/test/fake_proxy.h"
#include "cc/test/scheduler_test_common.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "cc/test/tiled_layer_test_common.h"
#include "cc/trees/single_thread_proxy.h" // For DebugScopedSetImplThread
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/resources/video_resource_updater_unittest.cc b/cc/resources/video_resource_updater_unittest.cc
index ff574ff..ca6ebd0 100644
--- a/cc/resources/video_resource_updater_unittest.cc
+++ b/cc/resources/video_resource_updater_unittest.cc
@@ -5,9 +5,9 @@
#include "cc/resources/video_resource_updater.h"
#include "base/memory/shared_memory.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/resources/resource_provider.h"
#include "cc/test/fake_output_surface.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "media/base/video_frame.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/scheduler/texture_uploader_unittest.cc b/cc/scheduler/texture_uploader_unittest.cc
index f4b4ce6..0595917 100644
--- a/cc/scheduler/texture_uploader_unittest.cc
+++ b/cc/scheduler/texture_uploader_unittest.cc
@@ -5,8 +5,8 @@
#include "cc/scheduler/texture_uploader.h"
#include "cc/base/util.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/resources/prioritized_resource.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/khronos/GLES2/gl2.h"
diff --git a/cc/test/fake_layer_tree_host_client.cc b/cc/test/fake_layer_tree_host_client.cc
index d0a1954..5e2caab 100644
--- a/cc/test/fake_layer_tree_host_client.cc
+++ b/cc/test/fake_layer_tree_host_client.cc
@@ -4,9 +4,9 @@
#include "cc/test/fake_layer_tree_host_client.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/output/context_provider.h"
#include "cc/test/fake_output_surface.h"
-#include "cc/test/test_web_graphics_context_3d.h"
namespace cc {
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index 5091dff..12fdcfc 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -7,11 +7,11 @@
#include "base/callback.h"
#include "base/time/time.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/output/begin_frame_args.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/output_surface.h"
#include "cc/output/software_output_device.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
namespace cc {
diff --git a/cc/test/fake_web_graphics_context_3d_unittest.cc b/cc/test/fake_web_graphics_context_3d_unittest.cc
index 3d119ee..ef0f143f 100644
--- a/cc/test/fake_web_graphics_context_3d_unittest.cc
+++ b/cc/test/fake_web_graphics_context_3d_unittest.cc
@@ -4,7 +4,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "cc/test/test_web_graphics_context_3d.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index ab81c67..764a9cf 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/containers/hash_tables.h"
#include "cc/base/math_util.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/input/top_controls_manager.h"
#include "cc/layers/delegated_renderer_layer_impl.h"
#include "cc/layers/heads_up_display_layer_impl.h"
@@ -39,7 +40,6 @@
#include "cc/test/geometry_test_utils.h"
#include "cc/test/layer_test_common.h"
#include "cc/test/render_pass_test_common.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/single_thread_proxy.h"
#include "media/base/media.h"
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 4384369..a0d7f3d 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -6,6 +6,7 @@
#include "base/basictypes.h"
#include "cc/debug/fake_context_provider.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/layers/content_layer.h"
#include "cc/layers/heads_up_display_layer.h"
#include "cc/layers/io_surface_layer.h"
@@ -30,7 +31,6 @@
#include "cc/test/fake_video_frame_provider.h"
#include "cc/test/layer_tree_test.h"
#include "cc/test/render_pass_test_common.h"
-#include "cc/test/test_web_graphics_context_3d.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/single_thread_proxy.h"
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 6defa97..34cf9b4 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -17,6 +17,7 @@
#include "base/threading/thread_restrictions.h"
#include "cc/base/switches.h"
#include "cc/debug/fake_context_provider.h"
+#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/input/input_handler.h"
#include "cc/layers/layer.h"
#include "cc/output/context_provider.h"
@@ -28,7 +29,6 @@
#include "ui/compositor/dip_util.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/reflector.h"
-#include "ui/compositor/test_web_graphics_context_3d.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
@@ -166,7 +166,9 @@ TestContextFactory::~TestContextFactory() {}
scoped_ptr<cc::OutputSurface> TestContextFactory::CreateOutputSurface(
Compositor* compositor) {
- return make_scoped_ptr(new cc::OutputSurface(CreateOffscreenContext()));
+ scoped_ptr<WebKit::WebGraphicsContext3D> context(
+ cc::TestWebGraphicsContext3D::Create());
+ return make_scoped_ptr(new cc::OutputSurface(context.Pass()));
}
scoped_refptr<Reflector> TestContextFactory::CreateReflector(
@@ -183,7 +185,7 @@ TestContextFactory::OffscreenContextProviderForMainThread() {
if (!offscreen_contexts_main_thread_.get() ||
offscreen_contexts_main_thread_->DestroyedOnMainThread()) {
offscreen_contexts_main_thread_ = cc::FakeContextProvider::Create(
- base::Bind(&TestContextFactory::CreateOffscreenContext));
+ cc::TestWebGraphicsContext3D::CreateBaseFactory());
CHECK(offscreen_contexts_main_thread_->BindToCurrentThread());
}
return offscreen_contexts_main_thread_;
@@ -194,7 +196,7 @@ TestContextFactory::OffscreenContextProviderForCompositorThread() {
if (!offscreen_contexts_compositor_thread_.get() ||
offscreen_contexts_compositor_thread_->DestroyedOnMainThread()) {
offscreen_contexts_compositor_thread_ = cc::FakeContextProvider::Create(
- base::Bind(&TestContextFactory::CreateOffscreenContext));
+ cc::TestWebGraphicsContext3D::CreateBaseFactory());
}
return offscreen_contexts_compositor_thread_;
}
@@ -204,15 +206,6 @@ void TestContextFactory::RemoveCompositor(Compositor* compositor) {
bool TestContextFactory::DoesCreateTestContexts() { return true; }
-// static
-scoped_ptr<WebKit::WebGraphicsContext3D>
-TestContextFactory::CreateOffscreenContext() {
- scoped_ptr<ui::TestWebGraphicsContext3D> context(
- new ui::TestWebGraphicsContext3D);
- context->Initialize();
- return context.PassAs<WebKit::WebGraphicsContext3D>();
-}
-
Texture::Texture(bool flipped, const gfx::Size& size, float device_scale_factor)
: size_(size),
flipped_(flipped),
diff --git a/ui/compositor/compositor.gyp b/ui/compositor/compositor.gyp
index 4cab1da..83d1971 100644
--- a/ui/compositor/compositor.gyp
+++ b/ui/compositor/compositor.gyp
@@ -56,9 +56,6 @@
'scoped_animation_duration_scale_mode.h',
'scoped_layer_animation_settings.cc',
'scoped_layer_animation_settings.h',
- # UI tests need TestWebGraphicsContext3D, so we always build it.
- 'test_web_graphics_context_3d.cc',
- 'test_web_graphics_context_3d.h',
'transform_animation_curve_adapter.cc',
'transform_animation_curve_adapter.h',
],
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index b9cdb82..124fe06 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -164,10 +164,8 @@ class COMPOSITOR_EXPORT TestContextFactory : public ContextFactory {
virtual bool DoesCreateTestContexts() OVERRIDE;
private:
- static scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext();
-
scoped_refptr<cc::FakeContextProvider> offscreen_contexts_main_thread_;
- scoped_refptr<cc::ContextProvider> offscreen_contexts_compositor_thread_;
+ scoped_refptr<cc::FakeContextProvider> offscreen_contexts_compositor_thread_;
DISALLOW_COPY_AND_ASSIGN(TestContextFactory);
};
diff --git a/ui/compositor/test_web_graphics_context_3d.cc b/ui/compositor/test_web_graphics_context_3d.cc
deleted file mode 100644
index d8febc9..0000000
--- a/ui/compositor/test_web_graphics_context_3d.cc
+++ /dev/null
@@ -1,220 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/compositor/test_web_graphics_context_3d.h"
-
-#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_context_stub.h"
-#include "ui/gl/gl_surface_stub.h"
-
-namespace ui {
-
-TestWebGraphicsContext3D::TestWebGraphicsContext3D()
- : next_texture_id_(1) {}
-
-TestWebGraphicsContext3D::~TestWebGraphicsContext3D() {}
-
-void TestWebGraphicsContext3D::Initialize() {
- gl_surface_ = new gfx::GLSurfaceStub;
- gl_context_ = new gfx::GLContextStub;
- gl_context_->MakeCurrent(gl_surface_.get());
-}
-
-bool TestWebGraphicsContext3D::makeContextCurrent() {
- return true;
-}
-
-int TestWebGraphicsContext3D::width() {
- return 0;
-}
-
-int TestWebGraphicsContext3D::height() {
- return 0;
-}
-
-bool TestWebGraphicsContext3D::isContextLost() {
- return false;
-}
-
-void* TestWebGraphicsContext3D::mapBufferSubDataCHROMIUM(
- WebKit::WGC3Denum target,
- WebKit::WGC3Dintptr offset,
- WebKit::WGC3Dsizeiptr size,
- WebKit::WGC3Denum access) {
- return 0;
-}
-
-void* TestWebGraphicsContext3D::mapTexSubImage2DCHROMIUM(
- WebKit::WGC3Denum target,
- WebKit::WGC3Dint level,
- WebKit::WGC3Dint xoffset,
- WebKit::WGC3Dint yoffset,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height,
- WebKit::WGC3Denum format,
- WebKit::WGC3Denum type,
- WebKit::WGC3Denum access) {
- return 0;
-}
-
-WebKit::WebString TestWebGraphicsContext3D::getRequestableExtensionsCHROMIUM() {
- return WebKit::WebString();
-}
-
-WebKit::WGC3Denum TestWebGraphicsContext3D::checkFramebufferStatus(
- WebKit::WGC3Denum target) {
- return GL_FRAMEBUFFER_COMPLETE;
-}
-
-bool TestWebGraphicsContext3D::getActiveAttrib(WebKit::WebGLId program,
- WebKit::WGC3Duint index,
- ActiveInfo& info) {
- return false;
-}
-
-bool TestWebGraphicsContext3D::getActiveUniform(WebKit::WebGLId program,
- WebKit::WGC3Duint index,
- ActiveInfo& info) {
- return false;
-}
-
-WebKit::WGC3Dint TestWebGraphicsContext3D::getAttribLocation(
- WebKit::WebGLId program,
- const WebKit::WGC3Dchar* name) {
- return 0;
-}
-
-TestWebGraphicsContext3D::Attributes
-TestWebGraphicsContext3D::getContextAttributes() {
- return Attributes();
-}
-
-WebKit::WGC3Denum TestWebGraphicsContext3D::getError() {
- return 0;
-}
-
-void TestWebGraphicsContext3D::getIntegerv(WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value) {
- if (pname == GL_MAX_TEXTURE_SIZE)
- *value = 1024;
- else if (pname == GL_ACTIVE_TEXTURE)
- *value = GL_TEXTURE0;
-}
-
-void TestWebGraphicsContext3D::getProgramiv(WebKit::WebGLId program,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value) {
- if (pname == GL_LINK_STATUS)
- *value = 1;
-}
-
-WebKit::WebString TestWebGraphicsContext3D::getProgramInfoLog(
- WebKit::WebGLId program) {
- return WebKit::WebString();
-}
-
-void TestWebGraphicsContext3D::getShaderiv(WebKit::WebGLId shader,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value) {
- if (pname == GL_COMPILE_STATUS)
- *value = 1;
-}
-
-WebKit::WebString TestWebGraphicsContext3D::getShaderInfoLog(
- WebKit::WebGLId shader) {
- return WebKit::WebString();
-}
-
-WebKit::WebString TestWebGraphicsContext3D::getShaderSource(
- WebKit::WebGLId shader) {
- return WebKit::WebString();
-}
-
-WebKit::WebString TestWebGraphicsContext3D::getString(WebKit::WGC3Denum name) {
- return WebKit::WebString();
-}
-
-WebKit::WGC3Dint TestWebGraphicsContext3D::getUniformLocation(
- WebKit::WebGLId program,
- const WebKit::WGC3Dchar* name) {
- return 0;
-}
-
-WebKit::WGC3Dsizeiptr TestWebGraphicsContext3D::getVertexAttribOffset(
- WebKit::WGC3Duint index,
- WebKit::WGC3Denum pname) {
- return 0;
-}
-
-WebKit::WGC3Dboolean TestWebGraphicsContext3D::isBuffer(
- WebKit::WebGLId buffer) {
- return false;
-}
-
-WebKit::WGC3Dboolean TestWebGraphicsContext3D::isEnabled(
- WebKit::WGC3Denum cap) {
- return false;
-}
-
-WebKit::WGC3Dboolean TestWebGraphicsContext3D::isFramebuffer(
- WebKit::WebGLId framebuffer) {
- return false;
-}
-
-WebKit::WGC3Dboolean TestWebGraphicsContext3D::isProgram(
- WebKit::WebGLId program) {
- return false;
-}
-
-WebKit::WGC3Dboolean TestWebGraphicsContext3D::isRenderbuffer(
- WebKit::WebGLId renderbuffer) {
- return false;
-}
-
-WebKit::WGC3Dboolean TestWebGraphicsContext3D::isShader(
- WebKit::WebGLId shader) {
- return false;
-}
-
-WebKit::WGC3Dboolean TestWebGraphicsContext3D::isTexture(
- WebKit::WebGLId texture) {
- return false;
-}
-
-WebKit::WebGLId TestWebGraphicsContext3D::createBuffer() {
- return 1;
-}
-
-WebKit::WebGLId TestWebGraphicsContext3D::createFramebuffer() {
- return 1;
-}
-
-WebKit::WebGLId TestWebGraphicsContext3D::createProgram() {
- return 1;
-}
-
-WebKit::WebGLId TestWebGraphicsContext3D::createRenderbuffer() {
- return 1;
-}
-
-WebKit::WebGLId TestWebGraphicsContext3D::createShader(
- WebKit::WGC3Denum value) {
- return 1;
-}
-
-WebKit::WebGLId TestWebGraphicsContext3D::createTexture() {
- return next_texture_id_++;
-}
-
-WebKit::WebGLId TestWebGraphicsContext3D::createQueryEXT()
-{
- return 1;
-}
-
-WebKit::WGC3Dboolean TestWebGraphicsContext3D::isQueryEXT(WebKit::WebGLId)
-{
- return true;
-}
-
-} // namespace ui
diff --git a/ui/compositor/test_web_graphics_context_3d.h b/ui/compositor/test_web_graphics_context_3d.h
deleted file mode 100644
index f7a9622..0000000
--- a/ui/compositor/test_web_graphics_context_3d.h
+++ /dev/null
@@ -1,450 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_COMPOSITOR_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
-#define UI_COMPOSITOR_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
-
-#include "base/logging.h"
-#include "base/memory/ref_counted.h"
-#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
-#include "third_party/WebKit/public/platform/WebString.h"
-#include "ui/compositor/compositor_export.h"
-
-namespace gfx {
-class GLContext;
-class GLSurface;
-}
-
-namespace ui {
-
-// WebGraphicsContext3D that does nothing. Suitable for testing.
-class COMPOSITOR_EXPORT TestWebGraphicsContext3D :
- public NON_EXPORTED_BASE(WebKit::WebGraphicsContext3D) {
- public:
- TestWebGraphicsContext3D();
- virtual ~TestWebGraphicsContext3D();
-
- void Initialize();
- virtual bool makeContextCurrent();
- virtual int width();
- virtual int height();
- virtual void reshape(int width, int height) {}
- virtual void prepareTexture() {}
- virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) {}
- virtual void synthesizeGLError(WebKit::WGC3Denum value) {}
- virtual bool isContextLost();
- virtual void* mapBufferSubDataCHROMIUM(WebKit::WGC3Denum target,
- WebKit::WGC3Dintptr offset,
- WebKit::WGC3Dsizeiptr size,
- WebKit::WGC3Denum access);
- virtual void unmapBufferSubDataCHROMIUM(const void* data) {}
- virtual void* mapTexSubImage2DCHROMIUM(WebKit::WGC3Denum target,
- WebKit::WGC3Dint level,
- WebKit::WGC3Dint xoffset,
- WebKit::WGC3Dint yoffset,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height,
- WebKit::WGC3Denum format,
- WebKit::WGC3Denum type,
- WebKit::WGC3Denum access);
- virtual void unmapTexSubImage2DCHROMIUM(const void* data) {}
- virtual void setVisibilityCHROMIUM(bool visible) {}
- virtual void discardFramebufferEXT(WebKit::WGC3Denum target,
- WebKit::WGC3Dsizei numAttachments,
- const WebKit::WGC3Denum* attachments) {}
- virtual void setMemoryAllocationChangedCallbackCHROMIUM(
- WebGraphicsMemoryAllocationChangedCallbackCHROMIUM*) { }
- virtual WebKit::WebString getRequestableExtensionsCHROMIUM();
- virtual void requestExtensionCHROMIUM(const char*) {}
- virtual void blitFramebufferCHROMIUM(WebKit::WGC3Dint src_x0,
- WebKit::WGC3Dint src_y0,
- WebKit::WGC3Dint src_x1,
- WebKit::WGC3Dint src_y1,
- WebKit::WGC3Dint dst_x0,
- WebKit::WGC3Dint dst_y0,
- WebKit::WGC3Dint dst_x1,
- WebKit::WGC3Dint dst_y1,
- WebKit::WGC3Dbitfield mask,
- WebKit::WGC3Denum filter) {}
- virtual void renderbufferStorageMultisampleCHROMIUM(
- WebKit::WGC3Denum target,
- WebKit::WGC3Dsizei samples,
- WebKit::WGC3Denum internalformat,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height) {}
- virtual void activeTexture(WebKit::WGC3Denum texture) {}
- virtual void attachShader(WebKit::WebGLId program, WebKit::WebGLId shader) {}
- virtual void bindAttribLocation(WebKit::WebGLId program,
- WebKit::WGC3Duint index,
- const WebKit::WGC3Dchar* name) {}
- virtual void bindBuffer(WebKit::WGC3Denum target, WebKit::WebGLId buffer) {}
- virtual void bindFramebuffer(WebKit::WGC3Denum target,
- WebKit::WebGLId framebuffer) {}
- virtual void bindRenderbuffer(WebKit::WGC3Denum target,
- WebKit::WebGLId renderbuffer) {}
- virtual void bindTexture(WebKit::WGC3Denum target, WebKit::WebGLId texture) {}
- virtual void blendColor(WebKit::WGC3Dclampf red,
- WebKit::WGC3Dclampf green,
- WebKit::WGC3Dclampf blue,
- WebKit::WGC3Dclampf alpha) {}
- virtual void blendEquation(WebKit::WGC3Denum mode) {}
- virtual void blendEquationSeparate(WebKit::WGC3Denum modeRGB,
- WebKit::WGC3Denum modeAlpha) {}
- virtual void blendFunc(WebKit::WGC3Denum sfactor,
- WebKit::WGC3Denum dfactor) {}
- virtual void blendFuncSeparate(WebKit::WGC3Denum src_rgb,
- WebKit::WGC3Denum dst_rgb,
- WebKit::WGC3Denum src_alpha,
- WebKit::WGC3Denum dst_alpha) {}
- virtual void bufferData(WebKit::WGC3Denum target,
- WebKit::WGC3Dsizeiptr size,
- const void* data,
- WebKit::WGC3Denum usage) {}
- virtual void bufferSubData(WebKit::WGC3Denum target,
- WebKit::WGC3Dintptr offset,
- WebKit::WGC3Dsizeiptr size,
- const void* data) {}
- virtual WebKit::WGC3Denum checkFramebufferStatus(WebKit::WGC3Denum target);
- virtual void clear(WebKit::WGC3Dbitfield mask) {}
- virtual void clearColor(WebKit::WGC3Dclampf red,
- WebKit::WGC3Dclampf green,
- WebKit::WGC3Dclampf blue,
- WebKit::WGC3Dclampf alpha) {}
- virtual void clearDepth(WebKit::WGC3Dclampf depth) {}
- virtual void clearStencil(WebKit::WGC3Dint s) {}
- virtual void colorMask(WebKit::WGC3Dboolean red,
- WebKit::WGC3Dboolean green,
- WebKit::WGC3Dboolean blue,
- WebKit::WGC3Dboolean alpha) {}
- virtual void compileShader(WebKit::WebGLId shader) {}
- virtual void compressedTexImage2D(WebKit::WGC3Denum target,
- WebKit::WGC3Dint level,
- WebKit::WGC3Denum internalformat,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height,
- WebKit::WGC3Dint border,
- WebKit::WGC3Dsizei imageSize,
- const void* data) {}
- virtual void compressedTexSubImage2D(WebKit::WGC3Denum target,
- WebKit::WGC3Dint level,
- WebKit::WGC3Dint xoffset,
- WebKit::WGC3Dint yoffset,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height,
- WebKit::WGC3Denum format,
- WebKit::WGC3Dsizei imageSize,
- const void* data) {}
- virtual void copyTexImage2D(WebKit::WGC3Denum target,
- WebKit::WGC3Dint level,
- WebKit::WGC3Denum internal_format,
- WebKit::WGC3Dint x,
- WebKit::WGC3Dint y,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height,
- WebKit::WGC3Dint border) {}
- virtual void copyTexSubImage2D(WebKit::WGC3Denum target,
- WebKit::WGC3Dint level,
- WebKit::WGC3Dint xoffset,
- WebKit::WGC3Dint yoffset,
- WebKit::WGC3Dint x,
- WebKit::WGC3Dint y,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height) {}
- virtual void cullFace(WebKit::WGC3Denum mode) {}
- virtual void depthFunc(WebKit::WGC3Denum func) {}
- virtual void depthMask(WebKit::WGC3Dboolean flag) {}
- virtual void depthRange(WebKit::WGC3Dclampf z_near,
- WebKit::WGC3Dclampf z_far) {}
- virtual void detachShader(WebKit::WebGLId program, WebKit::WebGLId shader) {}
- virtual void disable(WebKit::WGC3Denum cap) {}
- virtual void disableVertexAttribArray(WebKit::WGC3Duint index) {}
- virtual void drawArrays(WebKit::WGC3Denum mode, WebKit::WGC3Dint first,
- WebKit::WGC3Dsizei count) {}
- virtual void drawElements(WebKit::WGC3Denum mode,
- WebKit::WGC3Dsizei count,
- WebKit::WGC3Denum type,
- WebKit::WGC3Dintptr offset) {}
- virtual void enable(WebKit::WGC3Denum cap) {}
- virtual void enableVertexAttribArray(WebKit::WGC3Duint index) {}
- virtual void finish() {}
- virtual void flush() {}
- virtual void framebufferRenderbuffer(WebKit::WGC3Denum target,
- WebKit::WGC3Denum attachment,
- WebKit::WGC3Denum renderbuffertarget,
- WebKit::WebGLId renderbuffer) {}
- virtual void framebufferTexture2D(WebKit::WGC3Denum target,
- WebKit::WGC3Denum attachment,
- WebKit::WGC3Denum textarget,
- WebKit::WebGLId texture,
- WebKit::WGC3Dint level) {}
- virtual void frontFace(WebKit::WGC3Denum mode) {}
- virtual void generateMipmap(WebKit::WGC3Denum target) {}
- virtual bool getActiveAttrib(WebKit::WebGLId program,
- WebKit::WGC3Duint index,
- ActiveInfo& info);
- virtual bool getActiveUniform(WebKit::WebGLId program,
- WebKit::WGC3Duint index,
- ActiveInfo& info);
- virtual void getAttachedShaders(WebKit::WebGLId program,
- WebKit::WGC3Dsizei maxCount,
- WebKit::WGC3Dsizei* count,
- WebKit::WebGLId* shaders) {}
- virtual WebKit::WGC3Dint getAttribLocation(WebKit::WebGLId program,
- const WebKit::WGC3Dchar* name);
- virtual void getBooleanv(WebKit::WGC3Denum pname,
- WebKit::WGC3Dboolean* value) {}
- virtual void getBufferParameteriv(WebKit::WGC3Denum target,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value) {}
- virtual Attributes getContextAttributes();
- virtual WebKit::WGC3Denum getError();
- virtual void getFloatv(WebKit::WGC3Denum pname, WebKit::WGC3Dfloat* value) {}
- virtual void getFramebufferAttachmentParameteriv(WebKit::WGC3Denum target,
- WebKit::WGC3Denum attachment,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value) {}
- virtual void getIntegerv(WebKit::WGC3Denum pname, WebKit::WGC3Dint* value);
- virtual void getProgramiv(WebKit::WebGLId program,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value);
- virtual WebKit::WebString getProgramInfoLog(WebKit::WebGLId program);
- virtual void getRenderbufferParameteriv(WebKit::WGC3Denum target,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value) {}
- virtual void getShaderiv(WebKit::WebGLId shader,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value);
- virtual WebKit::WebString getShaderInfoLog(WebKit::WebGLId shader);
- virtual void getShaderPrecisionFormat(WebKit::WGC3Denum shaderType,
- WebKit::WGC3Denum precisionType,
- WebKit::WGC3Dint* range,
- WebKit::WGC3Dint* precision) {}
- virtual WebKit::WebString getShaderSource(WebKit::WebGLId shader);
- virtual WebKit::WebString getString(WebKit::WGC3Denum name);
- virtual void getTexParameterfv(WebKit::WGC3Denum target,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dfloat* value) {}
- virtual void getTexParameteriv(WebKit::WGC3Denum target,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value) {}
- virtual void getUniformfv(WebKit::WebGLId program,
- WebKit::WGC3Dint location,
- WebKit::WGC3Dfloat* value) {}
- virtual void getUniformiv(WebKit::WebGLId program,
- WebKit::WGC3Dint location,
- WebKit::WGC3Dint* value) {}
- virtual WebKit::WGC3Dint getUniformLocation(WebKit::WebGLId program,
- const WebKit::WGC3Dchar* name);
- virtual void getVertexAttribfv(WebKit::WGC3Duint index,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dfloat* value) {}
- virtual void getVertexAttribiv(WebKit::WGC3Duint index,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint* value) {}
- virtual WebKit::WGC3Dsizeiptr getVertexAttribOffset(WebKit::WGC3Duint index,
- WebKit::WGC3Denum pname);
- virtual void hint(WebKit::WGC3Denum target, WebKit::WGC3Denum mode) {}
- virtual WebKit::WGC3Dboolean isBuffer(WebKit::WebGLId buffer);
- virtual WebKit::WGC3Dboolean isEnabled(WebKit::WGC3Denum cap);
- virtual WebKit::WGC3Dboolean isFramebuffer(WebKit::WebGLId framebuffer);
- virtual WebKit::WGC3Dboolean isProgram(WebKit::WebGLId program);
- virtual WebKit::WGC3Dboolean isRenderbuffer(WebKit::WebGLId renderbuffer);
- virtual WebKit::WGC3Dboolean isShader(WebKit::WebGLId shader);
- virtual WebKit::WGC3Dboolean isTexture(WebKit::WebGLId texture);
- virtual void lineWidth(WebKit::WGC3Dfloat) {}
- virtual void linkProgram(WebKit::WebGLId program) {}
- virtual void pixelStorei(WebKit::WGC3Denum pname, WebKit::WGC3Dint param) {}
- virtual void polygonOffset(WebKit::WGC3Dfloat factor,
- WebKit::WGC3Dfloat units) {}
- virtual void readPixels(WebKit::WGC3Dint x,
- WebKit::WGC3Dint y,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height,
- WebKit::WGC3Denum format,
- WebKit::WGC3Denum type,
- void* pixels) {}
- virtual void releaseShaderCompiler() {}
- virtual void renderbufferStorage(WebKit::WGC3Denum target,
- WebKit::WGC3Denum internalformat,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height) {}
- virtual void sampleCoverage(WebKit::WGC3Dclampf value,
- WebKit::WGC3Dboolean invert) {}
- virtual void scissor(WebKit::WGC3Dint x,
- WebKit::WGC3Dint y,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height) {}
- virtual void shaderSource(WebKit::WebGLId shader,
- const WebKit::WGC3Dchar* string) {}
- virtual void stencilFunc(WebKit::WGC3Denum func,
- WebKit::WGC3Dint ref,
- WebKit::WGC3Duint mask) {}
- virtual void stencilFuncSeparate(WebKit::WGC3Denum face,
- WebKit::WGC3Denum func,
- WebKit::WGC3Dint ref,
- WebKit::WGC3Duint mask) {}
- virtual void stencilMask(WebKit::WGC3Duint mask) {}
- virtual void stencilMaskSeparate(WebKit::WGC3Denum face,
- WebKit::WGC3Duint mask) {}
- virtual void stencilOp(WebKit::WGC3Denum fail,
- WebKit::WGC3Denum zfail,
- WebKit::WGC3Denum zpass) {}
- virtual void stencilOpSeparate(WebKit::WGC3Denum face,
- WebKit::WGC3Denum fail,
- WebKit::WGC3Denum zfail,
- WebKit::WGC3Denum zpass) {}
- virtual void texImage2D(WebKit::WGC3Denum target,
- WebKit::WGC3Dint level,
- WebKit::WGC3Denum internal_format,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height,
- WebKit::WGC3Dint border,
- WebKit::WGC3Denum format,
- WebKit::WGC3Denum type,
- const void* pixels) {}
- virtual void texParameterf(WebKit::WGC3Denum target,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dfloat param) {}
- virtual void texParameteri(WebKit::WGC3Denum target,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Dint param) {}
- virtual void texSubImage2D(WebKit::WGC3Denum target,
- WebKit::WGC3Dint level,
- WebKit::WGC3Dint xoffset,
- WebKit::WGC3Dint yoffset,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height,
- WebKit::WGC3Denum format,
- WebKit::WGC3Denum type,
- const void* pixels) {}
- virtual void uniform1f(WebKit::WGC3Dint location, WebKit::WGC3Dfloat x) {}
- virtual void uniform1fv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- const WebKit::WGC3Dfloat* v) {}
- virtual void uniform1i(WebKit::WGC3Dint location, WebKit::WGC3Dint x) {}
- virtual void uniform1iv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- const WebKit::WGC3Dint* v) {}
- virtual void uniform2f(WebKit::WGC3Dint location,
- WebKit::WGC3Dfloat x,
- WebKit::WGC3Dfloat y) {}
- virtual void uniform2fv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- const WebKit::WGC3Dfloat* v) {}
- virtual void uniform2i(WebKit::WGC3Dint location,
- WebKit::WGC3Dint x,
- WebKit::WGC3Dint y) {}
- virtual void uniform2iv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- const WebKit::WGC3Dint* v) {}
- virtual void uniform3f(WebKit::WGC3Dint location,
- WebKit::WGC3Dfloat x,
- WebKit::WGC3Dfloat y,
- WebKit::WGC3Dfloat z) {}
- virtual void uniform3fv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- const WebKit::WGC3Dfloat* v) {}
- virtual void uniform3i(WebKit::WGC3Dint location,
- WebKit::WGC3Dint x,
- WebKit::WGC3Dint y,
- WebKit::WGC3Dint z) {}
- virtual void uniform3iv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- const WebKit::WGC3Dint* v) {}
- virtual void uniform4f(WebKit::WGC3Dint location,
- WebKit::WGC3Dfloat x,
- WebKit::WGC3Dfloat y,
- WebKit::WGC3Dfloat z,
- WebKit::WGC3Dfloat w) {}
- virtual void uniform4fv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- const WebKit::WGC3Dfloat* v) {}
- virtual void uniform4i(WebKit::WGC3Dint location,
- WebKit::WGC3Dint x,
- WebKit::WGC3Dint y,
- WebKit::WGC3Dint z,
- WebKit::WGC3Dint w) {}
- virtual void uniform4iv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- const WebKit::WGC3Dint* v) {}
- virtual void uniformMatrix2fv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- WebKit::WGC3Dboolean transpose,
- const WebKit::WGC3Dfloat* value) {}
- virtual void uniformMatrix3fv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- WebKit::WGC3Dboolean transpose,
- const WebKit::WGC3Dfloat* value) {}
- virtual void uniformMatrix4fv(WebKit::WGC3Dint location,
- WebKit::WGC3Dsizei count,
- WebKit::WGC3Dboolean transpose,
- const WebKit::WGC3Dfloat* value) {}
- virtual void useProgram(WebKit::WebGLId program) {}
- virtual void validateProgram(WebKit::WebGLId program) {}
- virtual void vertexAttrib1f(WebKit::WGC3Duint index, WebKit::WGC3Dfloat x) {}
- virtual void vertexAttrib1fv(WebKit::WGC3Duint index,
- const WebKit::WGC3Dfloat* values) {}
- virtual void vertexAttrib2f(WebKit::WGC3Duint index,
- WebKit::WGC3Dfloat x,
- WebKit::WGC3Dfloat y) {}
- virtual void vertexAttrib2fv(WebKit::WGC3Duint index,
- const WebKit::WGC3Dfloat* values) {}
- virtual void vertexAttrib3f(WebKit::WGC3Duint index,
- WebKit::WGC3Dfloat x,
- WebKit::WGC3Dfloat y,
- WebKit::WGC3Dfloat z) {}
- virtual void vertexAttrib3fv(WebKit::WGC3Duint index,
- const WebKit::WGC3Dfloat* values) {}
- virtual void vertexAttrib4f(WebKit::WGC3Duint index,
- WebKit::WGC3Dfloat x,
- WebKit::WGC3Dfloat y,
- WebKit::WGC3Dfloat z,
- WebKit::WGC3Dfloat w) {}
- virtual void vertexAttrib4fv(WebKit::WGC3Duint index,
- const WebKit::WGC3Dfloat* values) {}
- virtual void vertexAttribPointer(WebKit::WGC3Duint index,
- WebKit::WGC3Dint size,
- WebKit::WGC3Denum type,
- WebKit::WGC3Dboolean normalized,
- WebKit::WGC3Dsizei stride,
- WebKit::WGC3Dintptr offset) {}
- virtual void viewport(WebKit::WGC3Dint x,
- WebKit::WGC3Dint y,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height) {}
- virtual WebKit::WebGLId createBuffer();
- virtual WebKit::WebGLId createFramebuffer();
- virtual WebKit::WebGLId createProgram();
- virtual WebKit::WebGLId createRenderbuffer();
- virtual WebKit::WebGLId createShader(WebKit::WGC3Denum value);
- virtual WebKit::WebGLId createTexture();
- virtual void deleteBuffer(WebKit::WebGLId) {}
- virtual void deleteFramebuffer(WebKit::WebGLId) {}
- virtual void deleteProgram(WebKit::WebGLId) {}
- virtual void deleteRenderbuffer(WebKit::WebGLId) {}
- virtual void deleteShader(WebKit::WebGLId) {}
- virtual void deleteTexture(WebKit::WebGLId) {}
- virtual WebKit::WebGLId createQueryEXT();
- virtual void deleteQueryEXT(WebKit::WebGLId) {};
- virtual WebKit::WGC3Dboolean isQueryEXT(WebKit::WebGLId query);
- virtual void beginQueryEXT(WebKit::WGC3Denum, WebKit::WebGLId) {}
- virtual void endQueryEXT(WebKit::WGC3Denum) {}
- virtual void getQueryivEXT(WebKit::WGC3Denum,
- WebKit::WGC3Denum,
- WebKit::WGC3Dint*) {}
- virtual void getQueryObjectuivEXT(WebKit::WebGLId,
- WebKit::WGC3Denum,
- WebKit::WGC3Duint*) {}
-
- private:
- scoped_refptr<gfx::GLContext> gl_context_;
- scoped_refptr<gfx::GLSurface> gl_surface_;
- unsigned next_texture_id_;
-
- DISALLOW_COPY_AND_ASSIGN(TestWebGraphicsContext3D);
-};
-
-} // namespace ui
-
-#endif // UI_COMPOSITOR_TEST_WEB_GRAPHICS_CONTEXT_3D_H_