summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r--gpu/command_buffer/client/gles2_c_lib_autogen.h5
-rw-r--r--gpu/command_buffer/client/gles2_cmd_helper_autogen.h7
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc12
-rw-r--r--gpu/command_buffer/client/gles2_implementation_autogen.h5
-rw-r--r--gpu/command_buffer/client/gles2_implementation_unittest_autogen.h4
-rw-r--r--gpu/command_buffer/client/gles2_interface_autogen.h3
-rw-r--r--gpu/command_buffer/client/gles2_interface_stub_autogen.h5
-rw-r--r--gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h3
-rw-r--r--gpu/command_buffer/client/gles2_trace_implementation_autogen.h5
-rw-r--r--gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h5
-rw-r--r--gpu/command_buffer/cmd_buffer_functions.txt2
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_autogen.h21
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_test_autogen.h6
-rw-r--r--gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc4
14 files changed, 59 insertions, 28 deletions
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h
index 7003cbc..b274a6b 100644
--- a/gpu/command_buffer/client/gles2_c_lib_autogen.h
+++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -1260,8 +1260,9 @@ void GL_APIENTRY GLES2UnmapTexSubImage2DCHROMIUM(const void* mem) {
}
void GL_APIENTRY GLES2ResizeCHROMIUM(GLuint width,
GLuint height,
- GLfloat scale_factor) {
- gles2::GetGLContext()->ResizeCHROMIUM(width, height, scale_factor);
+ GLfloat scale_factor,
+ GLboolean alpha) {
+ gles2::GetGLContext()->ResizeCHROMIUM(width, height, scale_factor, alpha);
}
const GLchar* GL_APIENTRY GLES2GetRequestableExtensionsCHROMIUM() {
return gles2::GetGLContext()->GetRequestableExtensionsCHROMIUM();
diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
index e2123f5..b5cf24c 100644
--- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
+++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
@@ -2410,10 +2410,13 @@ void UnmapBuffer(GLenum target) {
}
}
-void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) {
+void ResizeCHROMIUM(GLuint width,
+ GLuint height,
+ GLfloat scale_factor,
+ GLboolean alpha) {
gles2::cmds::ResizeCHROMIUM* c = GetCmdSpace<gles2::cmds::ResizeCHROMIUM>();
if (c) {
- c->Init(width, height, scale_factor);
+ c->Init(width, height, scale_factor, alpha);
}
}
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 208a08b..9b52768 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -4692,12 +4692,14 @@ void GLES2Implementation::UnmapTexSubImage2DCHROMIUM(const void* mem) {
CheckGLError();
}
-void GLES2Implementation::ResizeCHROMIUM(GLuint width, GLuint height,
- float scale_factor) {
+void GLES2Implementation::ResizeCHROMIUM(GLuint width,
+ GLuint height,
+ float scale_factor,
+ GLboolean alpha) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
- GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glResizeCHROMIUM("
- << width << ", " << height << ", " << scale_factor << ")");
- helper_->ResizeCHROMIUM(width, height, scale_factor);
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glResizeCHROMIUM(" << width << ", "
+ << height << ", " << scale_factor << ", " << alpha << ")");
+ helper_->ResizeCHROMIUM(width, height, scale_factor, alpha);
CheckGLError();
}
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index fc99066..0a4f886 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -870,7 +870,10 @@ void* MapTexSubImage2DCHROMIUM(GLenum target,
void UnmapTexSubImage2DCHROMIUM(const void* mem) override;
-void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) override;
+void ResizeCHROMIUM(GLuint width,
+ GLuint height,
+ GLfloat scale_factor,
+ GLboolean alpha) override;
const GLchar* GetRequestableExtensionsCHROMIUM() override;
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
index 23f6541..e8efce0 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
@@ -2792,9 +2792,9 @@ TEST_F(GLES2ImplementationTest, ResizeCHROMIUM) {
cmds::ResizeCHROMIUM cmd;
};
Cmds expected;
- expected.cmd.Init(1, 2, 3);
+ expected.cmd.Init(1, 2, 3, true);
- gl_->ResizeCHROMIUM(1, 2, 3);
+ gl_->ResizeCHROMIUM(1, 2, 3, true);
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}
diff --git a/gpu/command_buffer/client/gles2_interface_autogen.h b/gpu/command_buffer/client/gles2_interface_autogen.h
index 9edbc49..77872e7 100644
--- a/gpu/command_buffer/client/gles2_interface_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_autogen.h
@@ -646,7 +646,8 @@ virtual void* MapTexSubImage2DCHROMIUM(GLenum target,
virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) = 0;
virtual void ResizeCHROMIUM(GLuint width,
GLuint height,
- GLfloat scale_factor) = 0;
+ GLfloat scale_factor,
+ GLboolean alpha) = 0;
virtual const GLchar* GetRequestableExtensionsCHROMIUM() = 0;
virtual void RequestExtensionCHROMIUM(const char* extension) = 0;
virtual void GetProgramInfoCHROMIUM(GLuint program,
diff --git a/gpu/command_buffer/client/gles2_interface_stub_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
index bc478cb..5469525 100644
--- a/gpu/command_buffer/client/gles2_interface_stub_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
@@ -623,7 +623,10 @@ void* MapTexSubImage2DCHROMIUM(GLenum target,
GLenum type,
GLenum access) override;
void UnmapTexSubImage2DCHROMIUM(const void* mem) override;
-void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) override;
+void ResizeCHROMIUM(GLuint width,
+ GLuint height,
+ GLfloat scale_factor,
+ GLboolean alpha) override;
const GLchar* GetRequestableExtensionsCHROMIUM() override;
void RequestExtensionCHROMIUM(const char* extension) override;
void GetProgramInfoCHROMIUM(GLuint program,
diff --git a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
index 4e3a712..867652f 100644
--- a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
@@ -860,7 +860,8 @@ void* GLES2InterfaceStub::MapTexSubImage2DCHROMIUM(GLenum /* target */,
void GLES2InterfaceStub::UnmapTexSubImage2DCHROMIUM(const void* /* mem */) {}
void GLES2InterfaceStub::ResizeCHROMIUM(GLuint /* width */,
GLuint /* height */,
- GLfloat /* scale_factor */) {}
+ GLfloat /* scale_factor */,
+ GLboolean /* alpha */) {}
const GLchar* GLES2InterfaceStub::GetRequestableExtensionsCHROMIUM() {
return 0;
}
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
index 27923ea..209215e 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
@@ -623,7 +623,10 @@ void* MapTexSubImage2DCHROMIUM(GLenum target,
GLenum type,
GLenum access) override;
void UnmapTexSubImage2DCHROMIUM(const void* mem) override;
-void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) override;
+void ResizeCHROMIUM(GLuint width,
+ GLuint height,
+ GLfloat scale_factor,
+ GLboolean alpha) override;
const GLchar* GetRequestableExtensionsCHROMIUM() override;
void RequestExtensionCHROMIUM(const char* extension) override;
void GetProgramInfoCHROMIUM(GLuint program,
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
index 1fc343f..77c6ab6 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
@@ -1837,9 +1837,10 @@ void GLES2TraceImplementation::UnmapTexSubImage2DCHROMIUM(const void* mem) {
void GLES2TraceImplementation::ResizeCHROMIUM(GLuint width,
GLuint height,
- GLfloat scale_factor) {
+ GLfloat scale_factor,
+ GLboolean alpha) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ResizeCHROMIUM");
- gl_->ResizeCHROMIUM(width, height, scale_factor);
+ gl_->ResizeCHROMIUM(width, height, scale_factor, alpha);
}
const GLchar* GLES2TraceImplementation::GetRequestableExtensionsCHROMIUM() {
diff --git a/gpu/command_buffer/cmd_buffer_functions.txt b/gpu/command_buffer/cmd_buffer_functions.txt
index fe6e9e9..42ed5f5 100644
--- a/gpu/command_buffer/cmd_buffer_functions.txt
+++ b/gpu/command_buffer/cmd_buffer_functions.txt
@@ -265,7 +265,7 @@ GL_APICALL void* GL_APIENTRY glMapBufferRange (GLenumBufferTarget target,
GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenumBufferTarget target);
GL_APICALL void* GL_APIENTRY glMapTexSubImage2DCHROMIUM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLenum access);
GL_APICALL void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM (const void* mem);
-GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint height, GLfloat scale_factor);
+GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint height, GLfloat scale_factor, GLboolean alpha);
GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void);
GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* extension);
GL_APICALL void GL_APIENTRY glGetProgramInfoCHROMIUM (GLidProgram program, GLsizeiNotNegative bufsize, GLsizei* size, void* info);
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 95bf3a8..b26cea0 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -11899,15 +11899,23 @@ struct ResizeCHROMIUM {
void SetHeader() { header.SetCmd<ValueType>(); }
- void Init(GLuint _width, GLuint _height, GLfloat _scale_factor) {
+ void Init(GLuint _width,
+ GLuint _height,
+ GLfloat _scale_factor,
+ GLboolean _alpha) {
SetHeader();
width = _width;
height = _height;
scale_factor = _scale_factor;
+ alpha = _alpha;
}
- void* Set(void* cmd, GLuint _width, GLuint _height, GLfloat _scale_factor) {
- static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor);
+ void* Set(void* cmd,
+ GLuint _width,
+ GLuint _height,
+ GLfloat _scale_factor,
+ GLboolean _alpha) {
+ static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor, _alpha);
return NextCmdAddress<ValueType>(cmd);
}
@@ -11915,10 +11923,11 @@ struct ResizeCHROMIUM {
uint32_t width;
uint32_t height;
float scale_factor;
+ uint32_t alpha;
};
-static_assert(sizeof(ResizeCHROMIUM) == 16,
- "size of ResizeCHROMIUM should be 16");
+static_assert(sizeof(ResizeCHROMIUM) == 20,
+ "size of ResizeCHROMIUM should be 20");
static_assert(offsetof(ResizeCHROMIUM, header) == 0,
"offset of ResizeCHROMIUM header should be 0");
static_assert(offsetof(ResizeCHROMIUM, width) == 4,
@@ -11927,6 +11936,8 @@ static_assert(offsetof(ResizeCHROMIUM, height) == 8,
"offset of ResizeCHROMIUM height should be 8");
static_assert(offsetof(ResizeCHROMIUM, scale_factor) == 12,
"offset of ResizeCHROMIUM scale_factor should be 12");
+static_assert(offsetof(ResizeCHROMIUM, alpha) == 16,
+ "offset of ResizeCHROMIUM alpha should be 16");
struct GetRequestableExtensionsCHROMIUM {
typedef GetRequestableExtensionsCHROMIUM ValueType;
diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index b165447..95a8ab8 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -4007,14 +4007,16 @@ TEST_F(GLES2FormatTest, UnmapBuffer) {
TEST_F(GLES2FormatTest, ResizeCHROMIUM) {
cmds::ResizeCHROMIUM& cmd = *GetBufferAs<cmds::ResizeCHROMIUM>();
- void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11),
- static_cast<GLuint>(12), static_cast<GLfloat>(13));
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLuint>(12),
+ static_cast<GLfloat>(13), static_cast<GLboolean>(14));
EXPECT_EQ(static_cast<uint32_t>(cmds::ResizeCHROMIUM::kCmdId),
cmd.header.command);
EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
EXPECT_EQ(static_cast<GLuint>(11), cmd.width);
EXPECT_EQ(static_cast<GLuint>(12), cmd.height);
EXPECT_EQ(static_cast<GLfloat>(13), cmd.scale_factor);
+ EXPECT_EQ(static_cast<GLboolean>(14), cmd.alpha);
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
diff --git a/gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc b/gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc
index 3ceb5ff..6025427 100644
--- a/gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc
+++ b/gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc
@@ -341,7 +341,7 @@ TEST_F(GLTextureMailboxTest, ProduceFrontBuffer) {
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
gl2_.MakeCurrent();
- glResizeCHROMIUM(10, 10, 1);
+ glResizeCHROMIUM(10, 10, 1, true);
glClearColor(1, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT);
::gles2::GetGLContext()->SwapBuffers();
@@ -430,7 +430,7 @@ TEST_F(GLTextureMailboxTest, ProduceFrontBufferMultipleContexts) {
for (size_t i = 0; i < 2; ++i) {
other_gl[i].MakeCurrent();
- glResizeCHROMIUM(10, 10, 1);
+ glResizeCHROMIUM(10, 10, 1, true);
glClearColor(1-i%2, i%2, 0, 1);
glClear(GL_COLOR_BUFFER_BIT);
::gles2::GetGLContext()->SwapBuffers();