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

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: Created 5 years, 7 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/geometry/point.h" 11 #include "ui/gfx/geometry/point.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/rect.h" 13 #include "ui/gfx/geometry/rect.h"
14 #include "ui/gfx/gpu_memory_buffer.h"
14 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
15 #include "ui/gfx/overlay_transform.h" 16 #include "ui/gfx/overlay_transform.h"
16 #include "ui/ozone/ozone_base_export.h" 17 #include "ui/ozone/ozone_base_export.h"
17 18
18 class SkBitmap; 19 class SkBitmap;
19 class SkCanvas; 20 class SkCanvas;
20 21
21 namespace ui { 22 namespace ui {
22 23
23 class NativePixmap; 24 class NativePixmap;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 virtual OverlayCandidatesOzone* GetOverlayCandidates( 127 virtual OverlayCandidatesOzone* GetOverlayCandidates(
127 gfx::AcceleratedWidget w); 128 gfx::AcceleratedWidget w);
128 129
129 // Create a single native buffer to be used for overlay planes or zero copy 130 // Create a single native buffer to be used for overlay planes or zero copy
130 // for |widget| representing a particular display controller or default 131 // for |widget| representing a particular display controller or default
131 // display controller for kNullAcceleratedWidget. 132 // display controller for kNullAcceleratedWidget.
132 virtual scoped_refptr<NativePixmap> CreateNativePixmap( 133 virtual scoped_refptr<NativePixmap> CreateNativePixmap(
133 gfx::AcceleratedWidget widget, 134 gfx::AcceleratedWidget widget,
134 gfx::Size size, 135 gfx::Size size,
135 BufferFormat format, 136 BufferFormat format,
136 BufferUsage usage); 137 BufferUsage usage,
138 gfx::GpuMemoryBufferHandle* handle);
137 139
138 // Sets the overlay plane to switch to at the next page flip. 140 // Sets the overlay plane to switch to at the next page flip.
139 // |w| specifies the screen to display this overlay plane on. 141 // |w| specifies the screen to display this overlay plane on.
140 // |plane_z_order| specifies the stacking order of the plane relative to the 142 // |plane_z_order| specifies the stacking order of the plane relative to the
141 // main framebuffer located at index 0. 143 // main framebuffer located at index 0.
142 // |plane_transform| specifies how the buffer is to be transformed during. 144 // |plane_transform| specifies how the buffer is to be transformed during.
143 // composition. 145 // composition.
144 // |buffer| to be presented by the overlay. 146 // |buffer| to be presented by the overlay.
145 // |display_bounds| specify where it is supposed to be on the screen. 147 // |display_bounds| specify where it is supposed to be on the screen.
146 // |crop_rect| specifies the region within the buffer to be placed 148 // |crop_rect| specifies the region within the buffer to be placed
(...skipping 15 matching lines...) Expand all
162 // such as MAP for zero copy or SCANOUT for display controller. 164 // such as MAP for zero copy or SCANOUT for display controller.
163 virtual bool CanCreateNativePixmap(BufferUsage usage); 165 virtual bool CanCreateNativePixmap(BufferUsage usage);
164 166
165 private: 167 private:
166 static SurfaceFactoryOzone* impl_; // not owned 168 static SurfaceFactoryOzone* impl_; // not owned
167 }; 169 };
168 170
169 } // namespace ui 171 } // namespace ui
170 172
171 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ 173 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698