OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h" | 5 #include "ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/gl/gl_image_egl.h" | 8 #include "ui/gl/gl_image_egl.h" |
9 #include "ui/ozone/public/native_pixmap.h" | 9 #include "ui/ozone/public/native_pixmap.h" |
10 #include "ui/ozone/public/surface_factory_ozone.h" | 10 #include "ui/ozone/public/surface_factory_ozone.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 if (!Initialize(EGL_NATIVE_PIXMAP_KHR, pixmap->GetEGLClientBuffer(), attrs)) | 21 if (!Initialize(EGL_NATIVE_PIXMAP_KHR, pixmap->GetEGLClientBuffer(), attrs)) |
22 return false; | 22 return false; |
23 pixmap_ = pixmap; | 23 pixmap_ = pixmap; |
24 return true; | 24 return true; |
25 } | 25 } |
26 | 26 |
27 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 27 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
28 int z_order, | 28 int z_order, |
29 gfx::OverlayTransform transform, | 29 gfx::OverlayTransform transform, |
30 const gfx::Rect& bounds_rect, | 30 const gfx::Rect& bounds_rect, |
31 const gfx::RectF& crop_rect) OVERRIDE { | 31 const gfx::RectF& crop_rect) override { |
32 return SurfaceFactoryOzone::GetInstance()->ScheduleOverlayPlane( | 32 return SurfaceFactoryOzone::GetInstance()->ScheduleOverlayPlane( |
33 widget, z_order, transform, pixmap_, bounds_rect, crop_rect); | 33 widget, z_order, transform, pixmap_, bounds_rect, crop_rect); |
34 } | 34 } |
35 | 35 |
36 protected: | 36 protected: |
37 virtual ~GLImageOzoneNativePixmap() {} | 37 virtual ~GLImageOzoneNativePixmap() {} |
38 | 38 |
39 private: | 39 private: |
40 using gfx::GLImageEGL::Initialize; | 40 using gfx::GLImageEGL::Initialize; |
41 scoped_refptr<NativePixmap> pixmap_; | 41 scoped_refptr<NativePixmap> pixmap_; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } | 100 } |
101 scoped_refptr<GLImageOzoneNativePixmap> image = | 101 scoped_refptr<GLImageOzoneNativePixmap> image = |
102 new GLImageOzoneNativePixmap(size); | 102 new GLImageOzoneNativePixmap(size); |
103 if (!image->Initialize(it->second)) { | 103 if (!image->Initialize(it->second)) { |
104 return scoped_refptr<gfx::GLImage>(); | 104 return scoped_refptr<gfx::GLImage>(); |
105 } | 105 } |
106 return image; | 106 return image; |
107 } | 107 } |
108 | 108 |
109 } // namespace ui | 109 } // namespace ui |
OLD | NEW |