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

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

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on ToT Created 6 years 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"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 SurfaceFactoryOzone(); 81 SurfaceFactoryOzone();
82 virtual ~SurfaceFactoryOzone(); 82 virtual ~SurfaceFactoryOzone();
83 83
84 // Returns the singleton instance. 84 // Returns the singleton instance.
85 static SurfaceFactoryOzone* GetInstance(); 85 static SurfaceFactoryOzone* GetInstance();
86 86
87 // Returns native platform display handle. This is used to obtain the EGL 87 // Returns native platform display handle. This is used to obtain the EGL
88 // display connection for the native display. 88 // display connection for the native display.
89 virtual intptr_t GetNativeDisplay(); 89 virtual intptr_t GetNativeDisplay();
90 90
91 // Returns Drm file descriptor. This is used to obtain access to the
92 // driver interface by other API than GL.
93 virtual int GetDrmFd();
94
91 // Create SurfaceOzoneEGL for the specified gfx::AcceleratedWidget. 95 // Create SurfaceOzoneEGL for the specified gfx::AcceleratedWidget.
92 // 96 //
93 // Note: When used from content, this is called in the GPU process. The 97 // Note: When used from content, this is called in the GPU process. The
94 // platform must support creation of SurfaceOzoneEGL from the GPU process 98 // platform must support creation of SurfaceOzoneEGL from the GPU process
95 // using only the handle contained in gfx::AcceleratedWidget. 99 // using only the handle contained in gfx::AcceleratedWidget.
96 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( 100 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
97 gfx::AcceleratedWidget widget); 101 gfx::AcceleratedWidget widget);
98 102
99 // Create an EGL surface that isn't backed by any buffers, and is used 103 // Create an EGL surface that isn't backed by any buffers, and is used
100 // for overlay-only displays. This will return NULL if this mode is 104 // for overlay-only displays. This will return NULL if this mode is
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // such as MAP for zero copy or SCANOUT for display controller. 166 // such as MAP for zero copy or SCANOUT for display controller.
163 virtual bool CanCreateNativePixmap(BufferUsage usage); 167 virtual bool CanCreateNativePixmap(BufferUsage usage);
164 168
165 private: 169 private:
166 static SurfaceFactoryOzone* impl_; // not owned 170 static SurfaceFactoryOzone* impl_; // not owned
167 }; 171 };
168 172
169 } // namespace ui 173 } // namespace ui
170 174
171 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ 175 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698