summaryrefslogtreecommitdiffstats
path: root/cc/test/test_web_graphics_context_3d.h
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-03 05:18:44 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-03 05:18:44 +0000
commit1204dbb5dc93798fffbd332f1d143b6ef98f5f18 (patch)
tree4ec13b73c528e92acf8eb8252ccef44e813d37c6 /cc/test/test_web_graphics_context_3d.h
parentb4685c60c5c7f4125d8c4c695585ba964bbf0fd6 (diff)
downloadchromium_src-1204dbb5dc93798fffbd332f1d143b6ef98f5f18.zip
chromium_src-1204dbb5dc93798fffbd332f1d143b6ef98f5f18.tar.gz
chromium_src-1204dbb5dc93798fffbd332f1d143b6ef98f5f18.tar.bz2
cc: Add new RasterWorkerPool interface.
Refactor RasterWorkerPool interface such that it can be used to implement different type of resource updates mechanisms. The result is that the tile manager is no longer aware of the need to perform uploads. This cleans up the tile manager code significantly and allow zero copy resource updates to be properly supported. BUG=241644 TEST=cc_unittest --gtest_filter=BasicRasterWorkerPoolTest.* Review URL: https://chromiumcodereview.appspot.com/16190002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203670 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/test_web_graphics_context_3d.h')
-rw-r--r--cc/test/test_web_graphics_context_3d.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h
index 5780980..ffd847d 100644
--- a/cc/test/test_web_graphics_context_3d.h
+++ b/cc/test/test_web_graphics_context_3d.h
@@ -127,6 +127,22 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
WebKit::WGC3Denum access);
virtual WebKit::WGC3Dboolean unmapBufferCHROMIUM(WebKit::WGC3Denum target);
+ virtual void bindTexImage2DCHROMIUM(WebKit::WGC3Denum target,
+ WebKit::WGC3Dint image_id);
+ virtual WebKit::WGC3Duint createImageCHROMIUM(
+ WebKit::WGC3Dsizei width,
+ WebKit::WGC3Dsizei height,
+ WebKit::WGC3Denum internalformat);
+ virtual void destroyImageCHROMIUM(WebKit::WGC3Duint image_id);
+ virtual void getImageParameterivCHROMIUM(
+ WebKit::WGC3Duint image_id,
+ WebKit::WGC3Denum pname,
+ WebKit::WGC3Dint* params);
+ virtual void* mapImageCHROMIUM(
+ WebKit::WGC3Duint image_id,
+ WebKit::WGC3Denum access);
+ virtual void unmapImageCHROMIUM(WebKit::WGC3Duint image_id);
+
// When set, MakeCurrent() will fail after this many times.
void set_times_make_current_succeeds(int times) {
times_make_current_succeeds_ = times;
@@ -166,6 +182,8 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
virtual WebKit::WebGLId NextBufferId();
+ virtual WebKit::WebGLId NextImageId();
+
protected:
TestWebGraphicsContext3D();
TestWebGraphicsContext3D(
@@ -176,6 +194,7 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
unsigned context_id_;
unsigned next_buffer_id_;
+ unsigned next_image_id_;
unsigned next_texture_id_;
Attributes attributes_;
bool have_extension_io_surface_;
@@ -206,6 +225,16 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
};
ScopedPtrHashMap<unsigned, Buffer> buffers_;
unsigned bound_buffer_;
+ struct Image {
+ Image();
+ ~Image();
+
+ scoped_ptr<uint8[]> pixels;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Image);
+ };
+ ScopedPtrHashMap<unsigned, Image> images_;
base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_;
};