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

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

Issue 195583003: Add initial GpuMemoryBufferSurfaceTexture implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 months 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 | « content/common/gpu/gpu_channel.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ef6a45a2e1916e21ed9fc8ba7611a40ea9f23a7c..b44fa02b6f806a2f747950eb42d116078f80680b 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -880,6 +880,15 @@ void GpuCommandBufferStub::OnRegisterGpuMemoryBuffer(
uint32 height,
uint32 internalformat) {
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnRegisterGpuMemoryBuffer");
+#if defined(OS_ANDROID)
+ // Verify that renderer is not trying to use a surface texture it doesn't own.
+ if (gpu_memory_buffer.type == gfx::SURFACE_TEXTURE_BUFFER &&
+ gpu_memory_buffer.surface_texture_id.secondary_id !=
+ channel()->client_id()) {
+ LOG(ERROR) << "Illegal surface texture ID for renderer.";
+ return;
+ }
+#endif
if (gpu_control_) {
gpu_control_->RegisterGpuMemoryBuffer(id,
gpu_memory_buffer,
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698