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

Unified Diff: media/renderers/video_overlay_factory.cc

Issue 2648893002: Remove remaining traces of CreateGpuMemoryBufferImageCHROMIUM (Closed)
Patch Set: Rebase, but don't pull in extra changes... Created 3 years, 10 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 | « gpu/ipc/in_process_command_buffer.cc ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/video_overlay_factory.cc
diff --git a/media/renderers/video_overlay_factory.cc b/media/renderers/video_overlay_factory.cc
index de0331ae773873e5ee86ff61e0cf06b2af09dbed..6bb1f0f8f614dc41f8e9b4f0053c8f2effd38dc7 100644
--- a/media/renderers/video_overlay_factory.cc
+++ b/media/renderers/video_overlay_factory.cc
@@ -25,8 +25,13 @@ class VideoOverlayFactory::Texture {
gpu_factories_->GetGLContextLock());
if (lock) {
gpu::gles2::GLES2Interface* gl = lock->ContextGL();
- image_id_ = gl->CreateGpuMemoryBufferImageCHROMIUM(
- 1, 1, GL_RGBA, GL_READ_WRITE_CHROMIUM);
+ gpu_memory_buffer_ = gpu_factories_->CreateGpuMemoryBuffer(
+ gfx::Size(1, 1), gfx::BufferFormat::RGBA_8888,
+ gfx::BufferUsage::SCANOUT);
+ if (gpu_memory_buffer_) {
+ image_id_ = gl->CreateImageCHROMIUM(
+ gpu_memory_buffer_->AsClientBuffer(), 1, 1, GL_RGBA);
+ }
if (image_id_) {
gl->GenTextures(1, &texture_id_);
gl->BindTexture(GL_TEXTURE_2D, texture_id_);
@@ -65,6 +70,7 @@ class VideoOverlayFactory::Texture {
friend class VideoOverlayFactory;
GpuVideoAcceleratorFactories* gpu_factories_;
+ std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_;
GLuint image_id_;
GLuint texture_id_;
gpu::Mailbox mailbox_;
« no previous file with comments | « gpu/ipc/in_process_command_buffer.cc ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698