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

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: comments, make compositor non-singleton 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
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 static Compositor* Create();
24
25 virtual void SetRootLayer(WebKit::WebLayer* root) = 0;
26 virtual void SetWindowBounds(const gfx::Size& size) = 0;
27 virtual void SetWindowSurface(ANativeWindow* window) = 0;
28
29 // Callback to be run after the frame has been drawn. It passes back
30 // a synchronization point identifier.
31 typedef base::Callback<void(uint32)> SurfacePresentedCallback;
32
33 virtual void OnSurfaceUpdated(const SurfacePresentedCallback& callback) = 0;
34
35 protected:
36 Compositor() {}
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698