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

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

Issue 837483003: [ozone] Add stub async swap buffers implementation to ozone surfaceless. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/platform/egltest/ozone_platform_egltest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_OZONE_EGL_H_ 5 #ifndef UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_
6 #define UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_ 6 #define UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/overlay_transform.h" 11 #include "ui/gfx/overlay_transform.h"
11 #include "ui/ozone/ozone_base_export.h" 12 #include "ui/ozone/ozone_base_export.h"
12 13
13 namespace gfx { 14 namespace gfx {
14 class Size; 15 class Size;
15 class VSyncProvider; 16 class VSyncProvider;
16 } 17 }
17 18
18 namespace ui { 19 namespace ui {
(...skipping 12 matching lines...) Expand all
31 virtual intptr_t /* EGLNativeWindowType */ GetNativeWindow() = 0; 32 virtual intptr_t /* EGLNativeWindowType */ GetNativeWindow() = 0;
32 33
33 // Attempts to resize the EGL native window to match the viewport 34 // Attempts to resize the EGL native window to match the viewport
34 // size. 35 // size.
35 virtual bool ResizeNativeWindow(const gfx::Size& viewport_size) = 0; 36 virtual bool ResizeNativeWindow(const gfx::Size& viewport_size) = 0;
36 37
37 // Called after we swap buffers. This is usually a no-op but can 38 // Called after we swap buffers. This is usually a no-op but can
38 // be used to present the new front buffer if the platform requires this. 39 // be used to present the new front buffer if the platform requires this.
39 virtual bool OnSwapBuffers() = 0; 40 virtual bool OnSwapBuffers() = 0;
40 41
42 typedef base::Closure SwapCompletionCallback;
43 // Called after we swap buffers. This is usually a no-op but can
44 // be used to present the new front buffer if the platform requires this.
45 // The callback should be run on the calling thread
46 // (i.e. same thread SwapBuffersAsync is called).
47 virtual bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) = 0;
48
41 // Returns a gfx::VsyncProvider for this surface. Note that this may be 49 // Returns a gfx::VsyncProvider for this surface. Note that this may be
42 // called after we have entered the sandbox so if there are operations (e.g. 50 // called after we have entered the sandbox so if there are operations (e.g.
43 // opening a file descriptor providing vsync events) that must be done 51 // opening a file descriptor providing vsync events) that must be done
44 // outside of the sandbox, they must have been completed in 52 // outside of the sandbox, they must have been completed in
45 // InitializeHardware. Returns an empty scoped_ptr on error. 53 // InitializeHardware. Returns an empty scoped_ptr on error.
46 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() = 0; 54 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() = 0;
47 }; 55 };
48 56
49 } // namespace ui 57 } // namespace ui
50 58
51 #endif // UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_ 59 #endif // UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/egltest/ozone_platform_egltest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698