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

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 new crrev.com/1128113011 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 // Sets the overlay plane to switch to at the next page flip. 129 // Sets the overlay plane to switch to at the next page flip.
125 // |w| specifies the screen to display this overlay plane on. 130 // |w| specifies the screen to display this overlay plane on.
126 // |plane_z_order| specifies the stacking order of the plane relative to the 131 // |plane_z_order| specifies the stacking order of the plane relative to the
127 // main framebuffer located at index 0. 132 // main framebuffer located at index 0.
128 // |plane_transform| specifies how the buffer is to be transformed during. 133 // |plane_transform| specifies how the buffer is to be transformed during.
129 // composition. 134 // composition.
130 // |buffer| to be presented by the overlay. 135 // |buffer| to be presented by the overlay.
131 // |display_bounds| specify where it is supposed to be on the screen. 136 // |display_bounds| specify where it is supposed to be on the screen.
132 // |crop_rect| specifies the region within the buffer to be placed 137 // |crop_rect| specifies the region within the buffer to be placed
133 // inside |display_bounds|. This is specified in texture coordinates, in the 138 // inside |display_bounds|. This is specified in texture coordinates, in the
(...skipping 14 matching lines...) Expand all
148 SurfaceFactoryOzone(); 153 SurfaceFactoryOzone();
149 virtual ~SurfaceFactoryOzone(); 154 virtual ~SurfaceFactoryOzone();
150 155
151 private: 156 private:
152 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); 157 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone);
153 }; 158 };
154 159
155 } // namespace ui 160 } // namespace ui
156 161
157 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ 162 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698