Index: ui/gl/gl_surface_ozone.cc |
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc |
index 50a7326f66fb9acdd769248ceeb1ad1fc6748ec6..a0167510f6fb78a98c46334e02ec8448a2fbcffd 100644 |
--- a/ui/gl/gl_surface_ozone.cc |
+++ b/ui/gl/gl_surface_ozone.cc |
@@ -15,7 +15,7 @@ |
#include "ui/gfx/native_widget_types.h" |
#include "ui/gl/gl_context.h" |
#include "ui/gl/gl_image.h" |
-#include "ui/gl/gl_image_linux_dma_buffer.h" |
+#include "ui/gl/gl_image_ozone_native_pixmap.h" |
#include "ui/gl/gl_implementation.h" |
#include "ui/gl/gl_surface_egl.h" |
#include "ui/gl/gl_surface_osmesa.h" |
@@ -428,24 +428,6 @@ class GL_EXPORT GLSurfaceOzoneSurfacelessSurfaceImpl |
void Destroy() override; |
private: |
- class SurfaceImage : public GLImageLinuxDMABuffer { |
- public: |
- SurfaceImage(const gfx::Size& size, unsigned internalformat); |
- |
- bool Initialize(scoped_refptr<ui::NativePixmap> pixmap, |
- gfx::GpuMemoryBuffer::Format format); |
- bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
- int z_order, |
- gfx::OverlayTransform transform, |
- const gfx::Rect& bounds_rect, |
- const gfx::RectF& crop_rect) override; |
- |
- private: |
- ~SurfaceImage() override; |
- |
- scoped_refptr<ui::NativePixmap> pixmap_; |
- }; |
- |
~GLSurfaceOzoneSurfacelessSurfaceImpl() override; |
void BindFramebuffer(); |
@@ -458,35 +440,6 @@ class GL_EXPORT GLSurfaceOzoneSurfacelessSurfaceImpl |
DISALLOW_COPY_AND_ASSIGN(GLSurfaceOzoneSurfacelessSurfaceImpl); |
}; |
-GLSurfaceOzoneSurfacelessSurfaceImpl::SurfaceImage::SurfaceImage( |
- const gfx::Size& size, |
- unsigned internalformat) |
- : GLImageLinuxDMABuffer(size, internalformat) { |
-} |
- |
-bool GLSurfaceOzoneSurfacelessSurfaceImpl::SurfaceImage::Initialize( |
- scoped_refptr<ui::NativePixmap> pixmap, |
- gfx::GpuMemoryBuffer::Format format) { |
- base::FileDescriptor handle(pixmap->GetDmaBufFd(), false); |
- if (!GLImageLinuxDMABuffer::Initialize(handle, format, |
- pixmap->GetDmaBufPitch())) |
- return false; |
- pixmap_ = pixmap; |
- return true; |
-} |
-bool GLSurfaceOzoneSurfacelessSurfaceImpl::SurfaceImage::ScheduleOverlayPlane( |
- gfx::AcceleratedWidget widget, |
- int z_order, |
- gfx::OverlayTransform transform, |
- const gfx::Rect& bounds_rect, |
- const gfx::RectF& crop_rect) { |
- return pixmap_->ScheduleOverlayPlane(widget, z_order, transform, bounds_rect, |
- crop_rect); |
-} |
- |
-GLSurfaceOzoneSurfacelessSurfaceImpl::SurfaceImage::~SurfaceImage() { |
-} |
- |
GLSurfaceOzoneSurfacelessSurfaceImpl::GLSurfaceOzoneSurfacelessSurfaceImpl( |
scoped_ptr<ui::SurfaceOzoneEGL> ozone_surface, |
AcceleratedWidget widget) |
@@ -593,9 +546,10 @@ bool GLSurfaceOzoneSurfacelessSurfaceImpl::CreatePixmaps() { |
ui::SurfaceFactoryOzone::SCANOUT); |
if (!pixmap) |
return false; |
- scoped_refptr<SurfaceImage> image = |
- new SurfaceImage(GetSize(), GL_BGRA_EXT); |
- if (!image->Initialize(pixmap, gfx::GpuMemoryBuffer::Format::BGRA_8888)) |
+ scoped_refptr<GLImageOzoneNativePixmap> image = |
+ new GLImageOzoneNativePixmap(GetSize(), GL_BGRA_EXT); |
+ if (!image->Initialize(pixmap.get(), |
+ gfx::GpuMemoryBuffer::Format::BGRA_8888)) |
return false; |
images_[i] = image; |
// Bind image to texture. |