Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1058)

Unified Diff: cc/test/test_web_graphics_context_3d.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | cc/test/tiled_layer_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_web_graphics_context_3d.cc
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index 9fae995ec6f8d8d1e6b813b9e7d6de23cfeb051f..2d82f89a71cdd8005f69f41cecde3d8a6061e9f6 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -67,6 +67,7 @@ TestWebGraphicsContext3D::TestWebGraphicsContext3D()
last_update_type_(NoUpdate),
next_insert_sync_point_(1),
last_waited_sync_point_(0),
+ unpack_alignment_(4),
bound_buffer_(0),
weak_ptr_factory_(this) {
CreateNamespace();
@@ -367,6 +368,8 @@ void TestWebGraphicsContext3D::getIntegerv(
*value = max_texture_size_;
else if (pname == GL_ACTIVE_TEXTURE)
*value = GL_TEXTURE0;
+ else if (pname == GL_UNPACK_ALIGNMENT)
+ *value = unpack_alignment_;
}
void TestWebGraphicsContext3D::getProgramiv(GLuint program,
@@ -518,6 +521,28 @@ void TestWebGraphicsContext3D::bufferData(GLenum target,
current_used_transfer_buffer_usage_bytes_);
}
+void TestWebGraphicsContext3D::pixelStorei(GLenum pname, GLint param) {
+ switch (pname) {
+ case GL_UNPACK_ALIGNMENT:
+ // Param should be a power of two <= 8.
+ EXPECT_EQ(0, param & (param - 1));
+ EXPECT_GE(8, param);
+ switch (param) {
+ case 1:
+ case 2:
+ case 4:
+ case 8:
+ unpack_alignment_ = param;
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+}
+
void* TestWebGraphicsContext3D::mapBufferCHROMIUM(GLenum target,
GLenum access) {
base::AutoLock lock(namespace_->lock);
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | cc/test/tiled_layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698