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" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 SurfaceFactoryOzone(); | 76 SurfaceFactoryOzone(); |
77 virtual ~SurfaceFactoryOzone(); | 77 virtual ~SurfaceFactoryOzone(); |
78 | 78 |
79 // Returns the singleton instance. | 79 // Returns the singleton instance. |
80 static SurfaceFactoryOzone* GetInstance(); | 80 static SurfaceFactoryOzone* GetInstance(); |
81 | 81 |
82 // Returns native platform display handle. This is used to obtain the EGL | 82 // Returns native platform display handle. This is used to obtain the EGL |
83 // display connection for the native display. | 83 // display connection for the native display. |
84 virtual intptr_t GetNativeDisplay(); | 84 virtual intptr_t GetNativeDisplay(); |
85 | 85 |
86 // Returns Drm file descriptor. This is used to obtain access to the | |
87 // driver interface by other API than GL. | |
88 virtual int GetDrmFd(); | |
spang
2014/09/08 18:04:00
dnicoara reminded me to point out: We don't intend
| |
89 | |
86 // Create SurfaceOzoneEGL for the specified gfx::AcceleratedWidget. | 90 // Create SurfaceOzoneEGL for the specified gfx::AcceleratedWidget. |
87 // | 91 // |
88 // Note: When used from content, this is called in the GPU process. The | 92 // Note: When used from content, this is called in the GPU process. The |
89 // platform must support creation of SurfaceOzoneEGL from the GPU process | 93 // platform must support creation of SurfaceOzoneEGL from the GPU process |
90 // using only the handle contained in gfx::AcceleratedWidget. | 94 // using only the handle contained in gfx::AcceleratedWidget. |
91 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( | 95 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( |
92 gfx::AcceleratedWidget widget); | 96 gfx::AcceleratedWidget widget); |
93 | 97 |
94 // Create an EGL surface that isn't backed by any buffers, and is used | 98 // Create an EGL surface that isn't backed by any buffers, and is used |
95 // for overlay-only displays. This will return NULL if this mode is | 99 // for overlay-only displays. This will return NULL if this mode is |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 // overlay-only mode. | 153 // overlay-only mode. |
150 virtual bool CanShowPrimaryPlaneAsOverlay(); | 154 virtual bool CanShowPrimaryPlaneAsOverlay(); |
151 | 155 |
152 private: | 156 private: |
153 static SurfaceFactoryOzone* impl_; // not owned | 157 static SurfaceFactoryOzone* impl_; // not owned |
154 }; | 158 }; |
155 | 159 |
156 } // namespace ui | 160 } // namespace ui |
157 | 161 |
158 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 162 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
OLD | NEW |