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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 12389061: Android: Add support for CompositorFrame swaps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_android.h
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 4874172ef1e28e3c319916209941f3cb2c3f958f..d0fda8f9dbbf1efa0262116133b257c312ceb7c0 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -7,12 +7,14 @@
#include <map>
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/i18n/rtl.h"
#include "base/memory/scoped_ptr.h"
#include "base/process.h"
#include "content/browser/renderer_host/ime_adapter_android.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "gpu/command_buffer/common/mailbox.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
#include "ui/gfx/size.h"
@@ -137,6 +139,7 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
virtual bool LockMouse() OVERRIDE;
virtual void UnlockMouse() OVERRIDE;
virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE;
+ virtual void OnSwapCompositorFrame(const cc::CompositorFrame& frame) OVERRIDE;
virtual void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset,
float page_scale_factor,
const gfx::Vector2dF& page_scale_factor_limits,
@@ -173,6 +176,10 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
void MoveCaret(const gfx::Point& point);
private:
+ void BuffersSwapped(const gpu::Mailbox& mailbox,
+ const gfx::Size& size,
Sami 2013/03/05 17:44:42 Nit: pass size by value.
no sievers 2013/03/05 21:58:05 Done.
+ const base::Closure& ack_callback);
+
// The model object.
RenderWidgetHostImpl* host_;
@@ -207,8 +214,8 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
// Used for image transport when needing to share resources across threads.
scoped_ptr<SurfaceTextureTransportClient> surface_texture_transport_;
- // The mailbox name of the previously received frame.
- std::string current_mailbox_name_;
+ // The mailbox of the previously received frame.
+ gpu::Mailbox current_mailbox_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698