Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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_ |
| OLD | NEW |