diff options
author | mvujovic@adobe.com <mvujovic@adobe.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 05:59:57 +0000 |
---|---|---|
committer | mvujovic@adobe.com <mvujovic@adobe.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 05:59:57 +0000 |
commit | 521ba29fe8dcf0b0e1216affac2a28d9d6e0cd34 (patch) | |
tree | ac7d157b3229a4135fe9570752b58d85e032c4bd /cc/test/test_texture.h | |
parent | 05a13914f19cf7f7d21c724d836021e263139157 (diff) | |
download | chromium_src-521ba29fe8dcf0b0e1216affac2a28d9d6e0cd34.zip chromium_src-521ba29fe8dcf0b0e1216affac2a28d9d6e0cd34.tar.gz chromium_src-521ba29fe8dcf0b0e1216affac2a28d9d6e0cd34.tar.bz2 |
Make TestWebGraphicsContext3D capable of tracking texture parameters via texParameteri and getTexParameteriv
This makes bugs like http://crbug.com/274753 unit-testable.
Review URL: https://codereview.chromium.org/57993005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/test_texture.h')
-rw-r--r-- | cc/test/test_texture.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cc/test/test_texture.h b/cc/test/test_texture.h index 604432e..71015c8 100644 --- a/cc/test/test_texture.h +++ b/cc/test/test_texture.h @@ -5,6 +5,7 @@ #ifndef CC_TEST_TEST_TEXTURE_H_ #define CC_TEST_TEST_TEXTURE_H_ +#include "base/containers/hash_tables.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "cc/resources/resource_format.h" @@ -19,14 +20,15 @@ struct TestTexture : public base::RefCounted<TestTexture> { TestTexture(); void Reallocate(gfx::Size size, ResourceFormat format); + bool IsValidParameter(blink::WGC3Denum pname); gfx::Size size; ResourceFormat format; scoped_ptr<uint8_t[]> data; - // TODO(mvujovic): Replace this with a hash map of texture parameter names - // and values, which can hold this filter parameter value and more. - blink::WGC3Denum filter; + typedef base::hash_map<blink::WGC3Denum, blink::WGC3Dint> + TextureParametersMap; + TextureParametersMap params; private: friend class base::RefCounted<TestTexture>; |