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

Side by Side Diff: ui/ozone/public/surface_factory_ozone.h

Issue 1381133002: ozone: Implement support for CreateGpuMemoryBufferFromHandle for OzoneNativePixmap backed GMBs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmb-factory-create-from-handle
Patch Set: rebase Created 5 years, 2 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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/native_library.h" 10 #include "base/native_library.h"
11 #include "ui/gfx/buffer_types.h" 11 #include "ui/gfx/buffer_types.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 #include "ui/gfx/overlay_transform.h" 14 #include "ui/gfx/overlay_transform.h"
15 #include "ui/ozone/ozone_base_export.h" 15 #include "ui/ozone/ozone_base_export.h"
16 #include "ui/ozone/public/native_pixmap.h"
16 17
17 namespace ui { 18 namespace ui {
18 19
19 class NativePixmap; 20 class NativePixmap;
20 class SurfaceOzoneCanvas; 21 class SurfaceOzoneCanvas;
21 class SurfaceOzoneEGL; 22 class SurfaceOzoneEGL;
22 23
23 // The Ozone interface allows external implementations to hook into Chromium to 24 // The Ozone interface allows external implementations to hook into Chromium to
24 // provide a system specific implementation. The Ozone interface supports two 25 // provide a system specific implementation. The Ozone interface supports two
25 // drawing modes: 1) accelerated drawing through EGL and 2) software drawing 26 // drawing modes: 1) accelerated drawing through EGL and 2) software drawing
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Create a single native buffer to be used for overlay planes or zero copy 100 // Create a single native buffer to be used for overlay planes or zero copy
100 // for |widget| representing a particular display controller or default 101 // for |widget| representing a particular display controller or default
101 // display controller for kNullAcceleratedWidget. 102 // display controller for kNullAcceleratedWidget.
102 // It can be called on any thread. 103 // It can be called on any thread.
103 virtual scoped_refptr<NativePixmap> CreateNativePixmap( 104 virtual scoped_refptr<NativePixmap> CreateNativePixmap(
104 gfx::AcceleratedWidget widget, 105 gfx::AcceleratedWidget widget,
105 gfx::Size size, 106 gfx::Size size,
106 gfx::BufferFormat format, 107 gfx::BufferFormat format,
107 gfx::BufferUsage usage); 108 gfx::BufferUsage usage);
108 109
110 // Create a single native buffer from an existing handle.
111 // It can be called on any thread.
112 virtual scoped_refptr<NativePixmap> CreateNativePixmapFromHandle(
113 const gfx::NativePixmapHandle& handle);
114
109 protected: 115 protected:
110 SurfaceFactoryOzone(); 116 SurfaceFactoryOzone();
111 virtual ~SurfaceFactoryOzone(); 117 virtual ~SurfaceFactoryOzone();
112 118
113 private: 119 private:
114 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); 120 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone);
115 }; 121 };
116 122
117 } // namespace ui 123 } // namespace ui
118 124
119 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ 125 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698