Chromium Code Reviews

Side by Side Diff: ui/ozone/platform/drm/gbm_surface_factory.h

Issue 1134993003: ozone: Implement zero/one-copy texture for Ozone GBM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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 #ifndef UI_OZONE_PLATFORM_DRM_GBM_SURFACE_FACTORY_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GBM_SURFACE_FACTORY_H_
6 #define UI_OZONE_PLATFORM_DRM_GBM_SURFACE_FACTORY_H_ 6 #define UI_OZONE_PLATFORM_DRM_GBM_SURFACE_FACTORY_H_
7 7
8 #include "ui/ozone/platform/drm/drm_surface_factory.h" 8 #include "ui/ozone/platform/drm/drm_surface_factory.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 20 matching lines...)
31 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( 31 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
32 gfx::AcceleratedWidget widget) override; 32 gfx::AcceleratedWidget widget) override;
33 scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( 33 scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
34 gfx::AcceleratedWidget w) override; 34 gfx::AcceleratedWidget w) override;
35 scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget( 35 scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget(
36 gfx::AcceleratedWidget widget) override; 36 gfx::AcceleratedWidget widget) override;
37 scoped_refptr<ui::NativePixmap> CreateNativePixmap( 37 scoped_refptr<ui::NativePixmap> CreateNativePixmap(
38 gfx::AcceleratedWidget widget, 38 gfx::AcceleratedWidget widget,
39 gfx::Size size, 39 gfx::Size size,
40 BufferFormat format, 40 BufferFormat format,
41 BufferUsage usage) override; 41 BufferUsage usage,
42 gfx::GpuMemoryBufferHandle* handle) override;
42 OverlayCandidatesOzone* GetOverlayCandidates( 43 OverlayCandidatesOzone* GetOverlayCandidates(
43 gfx::AcceleratedWidget w) override; 44 gfx::AcceleratedWidget w) override;
44 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 45 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
45 int plane_z_order, 46 int plane_z_order,
46 gfx::OverlayTransform plane_transform, 47 gfx::OverlayTransform plane_transform,
47 scoped_refptr<NativePixmap> buffer, 48 scoped_refptr<NativePixmap> buffer,
48 const gfx::Rect& display_bounds, 49 const gfx::Rect& display_bounds,
49 const gfx::RectF& crop_rect) override; 50 const gfx::RectF& crop_rect) override;
50 bool CanShowPrimaryPlaneAsOverlay() override; 51 bool CanShowPrimaryPlaneAsOverlay() override;
51 bool CanCreateNativePixmap(BufferUsage usage) override; 52 bool CanCreateNativePixmap(BufferUsage usage) override;
52 53
53 private: 54 private:
54 scoped_refptr<GbmDevice> GetGbmDevice(gfx::AcceleratedWidget widget); 55 scoped_refptr<GbmDevice> GetGbmDevice(gfx::AcceleratedWidget widget);
55 56
56 bool allow_surfaceless_; 57 bool allow_surfaceless_;
57 58
58 DrmDeviceManager* drm_device_manager_; // Not owned. 59 DrmDeviceManager* drm_device_manager_; // Not owned.
59 60
60 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); 61 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory);
61 }; 62 };
62 63
63 } // namespace ui 64 } // namespace ui
64 65
65 #endif // UI_OZONE_PLATFORM_DRM_GBM_SURFACE_FACTORY_H_ 66 #endif // UI_OZONE_PLATFORM_DRM_GBM_SURFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine