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

Unified Diff: content/common/gpu/media/vaapi_drm_picture.cc

Issue 1258713002: ozone: unify GpuMemoryBufferFactoryOzoneNativePixmap in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix linux_chromium_gn_dgb build Created 5 years, 5 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_memory_buffer_factory_ozone_native_pixmap.cc ('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/media/vaapi_drm_picture.cc
diff --git a/content/common/gpu/media/vaapi_drm_picture.cc b/content/common/gpu/media/vaapi_drm_picture.cc
index 87be82e32fcbcbac5a0d29a72c2135ec05a3a70a..924473822eae709faf291fdeebfda92a334bfe4d 100644
--- a/content/common/gpu/media/vaapi_drm_picture.cc
+++ b/content/common/gpu/media/vaapi_drm_picture.cc
@@ -11,9 +11,8 @@
#include "third_party/libva/va/va_drmcommon.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_image_linux_dma_buffer.h"
+#include "ui/gl/gl_image_ozone_native_pixmap.h"
#include "ui/gl/scoped_binders.h"
-#include "ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h"
#include "ui/ozone/public/native_pixmap.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/surface_factory_ozone.h"
@@ -128,12 +127,13 @@ bool VaapiDrmPicture::Initialize() {
gfx::ScopedTextureBinder texture_binder(GL_TEXTURE_EXTERNAL_OES,
texture_id());
- gl_image_ = ui::GpuMemoryBufferFactoryOzoneNativePixmap::CreateImageForPixmap(
- pixmap_, size(), gfx::GpuMemoryBuffer::BGRA_8888, GL_BGRA_EXT);
- if (!gl_image_) {
+ scoped_refptr<gfx::GLImageOzoneNativePixmap> image(
+ new gfx::GLImageOzoneNativePixmap(size(), GL_BGRA_EXT));
+ if (!image->Initialize(pixmap_.get(), gfx::GpuMemoryBuffer::BGRA_8888)) {
LOG(ERROR) << "Failed to create GLImage";
return false;
}
+ gl_image_ = image;
if (!gl_image_->BindTexImage(GL_TEXTURE_EXTERNAL_OES)) {
LOG(ERROR) << "Failed to bind texture to GLImage";
return false;
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698