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

Unified Diff: components/mus/gles2/command_buffer_local.cc

Issue 1401423003: Re-land: ui: Move GLImage::BindTexImage fallback from GLImage implementations to GLES2CmdDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix stream texture issue Created 5 years, 2 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 | « no previous file | content/common/gpu/media/android_deferred_rendering_backing_strategy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/command_buffer_local.cc
diff --git a/components/mus/gles2/command_buffer_local.cc b/components/mus/gles2/command_buffer_local.cc
index ede027453f0084e15e27b79fddd63a25defde0d7..138f70722b3c847278f900ddc96dd180d560c440 100644
--- a/components/mus/gles2/command_buffer_local.cc
+++ b/components/mus/gles2/command_buffer_local.cc
@@ -5,6 +5,7 @@
#include "components/mus/gles2/command_buffer_local.h"
#include "base/bind.h"
+#include "base/memory/shared_memory.h"
#include "components/mus/gles2/command_buffer_local_client.h"
#include "components/mus/gles2/gpu_memory_tracker.h"
#include "components/mus/gles2/mojo_gpu_memory_buffer.h"
@@ -19,7 +20,7 @@
#include "gpu/command_buffer/service/valuebuffer_manager.h"
#include "ui/gfx/vsync_provider.h"
#include "ui/gl/gl_context.h"
-#include "ui/gl/gl_image_memory.h"
+#include "ui/gl/gl_image_shared_memory.h"
#include "ui/gl/gl_surface.h"
namespace mus {
@@ -135,12 +136,12 @@ int32_t CommandBufferLocal::CreateImage(ClientBuffer buffer,
MojoGpuMemoryBufferImpl* gpu_memory_buffer =
MojoGpuMemoryBufferImpl::FromClientBuffer(buffer);
- scoped_refptr<gfx::GLImageMemory> image(new gfx::GLImageMemory(
+ gfx::GpuMemoryBufferHandle handle = gpu_memory_buffer->GetHandle();
+ scoped_refptr<gfx::GLImageSharedMemory> image(new gfx::GLImageSharedMemory(
gfx::Size(static_cast<int>(width), static_cast<int>(height)),
internalformat));
- if (!image->Initialize(
- static_cast<const unsigned char*>(gpu_memory_buffer->GetMemory()),
- gpu_memory_buffer->GetFormat())) {
+ if (!image->Initialize(base::SharedMemory::DuplicateHandle(handle.handle),
+ handle.id, gpu_memory_buffer->GetFormat())) {
return -1;
}
« no previous file with comments | « no previous file | content/common/gpu/media/android_deferred_rendering_backing_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698