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

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

Issue 13771021: Add swap buffers posted method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/browser/renderer_host/compositor_impl_android.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 (c) 2012 The Chromium Authors. All rights reserved. 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 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 CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 15 matching lines...) Expand all
26 // An interface to the browser-side compositor. 26 // An interface to the browser-side compositor.
27 class CONTENT_EXPORT Compositor { 27 class CONTENT_EXPORT Compositor {
28 public: 28 public:
29 class Client { 29 class Client {
30 public: 30 public:
31 // Tells the client that it should schedule a composite. 31 // Tells the client that it should schedule a composite.
32 virtual void ScheduleComposite() = 0; 32 virtual void ScheduleComposite() = 0;
33 33
34 // The compositor has completed swapping a frame. 34 // The compositor has completed swapping a frame.
35 virtual void OnSwapBuffersCompleted() {} 35 virtual void OnSwapBuffersCompleted() {}
36
37 // The compositor will eventually swap a frame.
38 virtual void OnSwapBuffersPosted() {}
36 }; 39 };
37 40
38 virtual ~Compositor() {} 41 virtual ~Compositor() {}
39 42
40 // Performs the global initialization needed before any compositor 43 // Performs the global initialization needed before any compositor
41 // instance can be used. This should be called only once. 44 // instance can be used. This should be called only once.
42 static void Initialize(); 45 static void Initialize();
43 46
44 enum CompositorFlags { 47 enum CompositorFlags {
45 // Creates a direct GL context on the thread that draws 48 // Creates a direct GL context on the thread that draws
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, 117 virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id,
115 const gfx::Rect& src_rect, 118 const gfx::Rect& src_rect,
116 gfx::JavaBitmap& bitmap) = 0; 119 gfx::JavaBitmap& bitmap) = 0;
117 protected: 120 protected:
118 Compositor() {} 121 Compositor() {}
119 }; 122 };
120 123
121 } // namespace content 124 } // namespace content
122 125
123 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 126 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698