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

Side by Side Diff: ui/ozone/public/surface_factory_ozone.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: rebase to ToT 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_PUBLIC_SURFACE_FACTORY_OZONE_H_ 5 #ifndef UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
6 #define UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ 6 #define UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_descriptor_posix.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "base/native_library.h" 11 #include "base/native_library.h"
11 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 #include "ui/gfx/overlay_transform.h" 14 #include "ui/gfx/overlay_transform.h"
14 #include "ui/ozone/ozone_base_export.h" 15 #include "ui/ozone/ozone_base_export.h"
15 16
16 namespace ui { 17 namespace ui {
17 18
18 class NativePixmap; 19 class NativePixmap;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Create a single native buffer to be used for overlay planes or zero copy 115 // Create a single native buffer to be used for overlay planes or zero copy
115 // for |widget| representing a particular display controller or default 116 // for |widget| representing a particular display controller or default
116 // display controller for kNullAcceleratedWidget. 117 // display controller for kNullAcceleratedWidget.
117 // It can be called on any thread. 118 // It can be called on any thread.
118 virtual scoped_refptr<NativePixmap> CreateNativePixmap( 119 virtual scoped_refptr<NativePixmap> CreateNativePixmap(
119 gfx::AcceleratedWidget widget, 120 gfx::AcceleratedWidget widget,
120 gfx::Size size, 121 gfx::Size size,
121 BufferFormat format, 122 BufferFormat format,
122 BufferUsage usage); 123 BufferUsage usage);
123 124
125 // Export GpuMemoryBufferHandle from |pixmap|.
126 virtual base::FileDescriptor ExportDmaBuf(gfx::AcceleratedWidget widget,
127 scoped_refptr<NativePixmap> pixmap);
128
124 // Returns true if overlays can be shown at z-index 0, replacing the main 129 // Returns true if overlays can be shown at z-index 0, replacing the main
125 // surface. Combined with surfaceless extensions, it allows for an 130 // surface. Combined with surfaceless extensions, it allows for an
126 // overlay-only mode. 131 // overlay-only mode.
127 virtual bool CanShowPrimaryPlaneAsOverlay(); 132 virtual bool CanShowPrimaryPlaneAsOverlay();
128 133
129 protected: 134 protected:
130 SurfaceFactoryOzone(); 135 SurfaceFactoryOzone();
131 virtual ~SurfaceFactoryOzone(); 136 virtual ~SurfaceFactoryOzone();
132 137
133 private: 138 private:
134 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); 139 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone);
135 }; 140 };
136 141
137 } // namespace ui 142 } // namespace ui
138 143
139 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ 144 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698