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

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

Issue 1050923003: zero-copy: Clarify to allocate/destroy GpuMemoryBuffer on any thread and use it on the main thread o (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « ui/ozone/public/native_pixmap.h ('k') | ui/ozone/public/surface_factory_ozone.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/threading/thread_checker.h"
11 #include "ui/gfx/geometry/point.h" 12 #include "ui/gfx/geometry/point.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/geometry/rect.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
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Returns true if overlays can be shown at z-index 0, replacing the main 161 // Returns true if overlays can be shown at z-index 0, replacing the main
161 // surface. Combined with surfaceless extensions, it allows for an 162 // surface. Combined with surfaceless extensions, it allows for an
162 // overlay-only mode. 163 // overlay-only mode.
163 virtual bool CanShowPrimaryPlaneAsOverlay(); 164 virtual bool CanShowPrimaryPlaneAsOverlay();
164 165
165 // Returns true if the platform is able to create buffers for a specific usage 166 // Returns true if the platform is able to create buffers for a specific usage
166 // such as MAP for zero copy or SCANOUT for display controller. 167 // such as MAP for zero copy or SCANOUT for display controller.
167 virtual bool CanCreateNativePixmap(BufferUsage usage); 168 virtual bool CanCreateNativePixmap(BufferUsage usage);
168 169
169 private: 170 private:
171 base::ThreadChecker thread_checker_;
reveman 2015/04/01 19:22:20 A thread checker is good but please move it to the
dshwang 2015/04/02 07:56:05 This thread check is added to check SurfaceFactory
reveman 2015/04/02 12:35:39 GetInstance() is static. The thread usage restrict
dshwang 2015/04/02 14:26:27 Alright, I move thread check to each implementatio
170 static SurfaceFactoryOzone* impl_; // not owned 172 static SurfaceFactoryOzone* impl_; // not owned
171 }; 173 };
172 174
173 } // namespace ui 175 } // namespace ui
174 176
175 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ 177 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
OLDNEW
« no previous file with comments | « ui/ozone/public/native_pixmap.h ('k') | ui/ozone/public/surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698