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

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: 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 7215f87300d000422ea734a7f8722fed71f7aabf..239bab87a2b7751ba1c4234752584953a4e2408b 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,
@@ -175,6 +178,10 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
void MoveCaret(const gfx::Point& point);
private:
+ void BuffersSwapped(const gpu::Mailbox& mailbox,
+ const gfx::Size size,
+ const base::Closure& ack_callback);
+
// The model object.
RenderWidgetHostImpl* host_;
@@ -209,8 +216,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