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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 1417853006: gpu: introduce glSetStreamTextureSizeCHROMIUM(GLuint texture, GLint stream_id, GLsizei width, GLsiz… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android_webview.test failure Created 5 years, 1 month 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
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index b82d71532e5a9a0879be76493202502f2bb2c20e..28d4ff1752c6ad951a11ecd83dcb08d07f7d1a77 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -320,6 +320,8 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyImage, OnDestroyImage);
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_CreateStreamTexture,
OnCreateStreamTexture)
+ IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetStreamTextureSize,
+ OnSetStreamTextureSize)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -531,6 +533,10 @@ void GpuCommandBufferStub::OnInitialize(
GpuChannelManager* manager = channel_->gpu_channel_manager();
DCHECK(manager);
+#if defined(OS_ANDROID)
+ stream_texture_manager_.reset(new StreamTextureManager);
+#endif
+
decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group_.get()));
scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(),
decoder_.get(),
@@ -690,12 +696,23 @@ void GpuCommandBufferStub::OnInitialize(
void GpuCommandBufferStub::OnCreateStreamTexture(
uint32 texture_id, int32 stream_id, bool* succeeded) {
#if defined(OS_ANDROID)
- *succeeded = StreamTexture::Create(this, texture_id, stream_id);
+ *succeeded =
+ stream_texture_manager_->CreateStreamTexture(this, texture_id, stream_id);
#else
*succeeded = false;
#endif
}
+void GpuCommandBufferStub::OnSetStreamTextureSize(uint32 texture_id,
+ int32 stream_id,
+ size_t width,
+ size_t height) {
+#if defined(OS_ANDROID)
+ stream_texture_manager_->SetStreamTextureSize(this, texture_id, stream_id,
+ width, height);
+#endif
+}
+
void GpuCommandBufferStub::SetLatencyInfoCallback(
const LatencyInfoCallback& callback) {
latency_info_callback_ = callback;

Powered by Google App Engine
This is Rietveld 408576698