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

Side by Side Diff: content/public/browser/android/compositor.h

Issue 10828356: Very basic Android browser-side compositing support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « content/content_shell.gypi ('k') | content/public/browser/android/graphics_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
7
8 #include "base/callback.h"
9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gfx/size.h"
11
12 namespace WebKit {
13 class WebLayer;
14 }
15
16 namespace content {
17
18 // An interface to the browser-side compositor.
19 class Compositor {
20 public:
21 virtual ~Compositor() {}
22
23 // Performs the global initialization needed before any compositor
24 // instance can be used.
25 static void Initialize();
26
27 // Creates and returns a compositor instance.
28 static Compositor* Create();
29
30 // Attaches the layer tree.
31 virtual void SetRootLayer(WebKit::WebLayer* root) = 0;
32
33 // Set the output surface bounds.
34 virtual void SetWindowBounds(const gfx::Size& size) = 0;
35
36 // Set the output surface handle which the compositor renders into.
37 virtual void SetWindowSurface(ANativeWindow* window) = 0;
38
39 // Callback to be run after the frame has been drawn. It passes back
40 // a synchronization point identifier.
41 typedef base::Callback<void(uint32)> SurfacePresentedCallback;
42
43 virtual void OnSurfaceUpdated(const SurfacePresentedCallback& callback) = 0;
44
45 protected:
46 Compositor() {}
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/content_shell.gypi ('k') | content/public/browser/android/graphics_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698