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

Side by Side 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, 9 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
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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/callback.h"
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/process.h" 14 #include "base/process.h"
14 #include "content/browser/renderer_host/ime_adapter_android.h" 15 #include "content/browser/renderer_host/ime_adapter_android.h"
15 #include "content/browser/renderer_host/render_widget_host_view_base.h" 16 #include "content/browser/renderer_host/render_widget_host_view_base.h"
17 #include "gpu/command_buffer/common/mailbox.h"
16 #include "third_party/skia/include/core/SkColor.h" 18 #include "third_party/skia/include/core/SkColor.h"
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
18 #include "ui/gfx/size.h" 20 #include "ui/gfx/size.h"
19 #include "ui/gfx/vector2d_f.h" 21 #include "ui/gfx/vector2d_f.h"
20 22
21 struct ViewHostMsg_TextInputState_Params; 23 struct ViewHostMsg_TextInputState_Params;
22 24
23 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; 25 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
24 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; 26 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params;
25 27
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 virtual void SetScrollOffsetPinning( 132 virtual void SetScrollOffsetPinning(
131 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; 133 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
132 virtual void UnhandledWheelEvent( 134 virtual void UnhandledWheelEvent(
133 const WebKit::WebMouseWheelEvent& event) OVERRIDE; 135 const WebKit::WebMouseWheelEvent& event) OVERRIDE;
134 virtual void OnAccessibilityNotifications( 136 virtual void OnAccessibilityNotifications(
135 const std::vector<AccessibilityHostMsg_NotificationParams>& 137 const std::vector<AccessibilityHostMsg_NotificationParams>&
136 params) OVERRIDE; 138 params) OVERRIDE;
137 virtual bool LockMouse() OVERRIDE; 139 virtual bool LockMouse() OVERRIDE;
138 virtual void UnlockMouse() OVERRIDE; 140 virtual void UnlockMouse() OVERRIDE;
139 virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE; 141 virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE;
142 virtual void OnSwapCompositorFrame(const cc::CompositorFrame& frame) OVERRIDE;
140 virtual void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, 143 virtual void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset,
141 float page_scale_factor, 144 float page_scale_factor,
142 const gfx::Vector2dF& page_scale_factor_limits, 145 const gfx::Vector2dF& page_scale_factor_limits,
143 const gfx::SizeF& content_size, 146 const gfx::SizeF& content_size,
144 const gfx::SizeF& viewport_size, 147 const gfx::SizeF& viewport_size,
145 const gfx::Vector2dF& controls_offset, 148 const gfx::Vector2dF& controls_offset,
146 const gfx::Vector2dF& content_offset) OVERRIDE; 149 const gfx::Vector2dF& content_offset) OVERRIDE;
147 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, 150 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect,
148 const SkBitmap& zoomed_bitmap) OVERRIDE; 151 const SkBitmap& zoomed_bitmap) OVERRIDE;
149 152
(...skipping 18 matching lines...) Expand all
168 bool PopulateBitmapWithContents(jobject jbitmap); 171 bool PopulateBitmapWithContents(jobject jbitmap);
169 172
170 bool HasValidFrame() const; 173 bool HasValidFrame() const;
171 174
172 // Select all text between the given coordinates. 175 // Select all text between the given coordinates.
173 void SelectRange(const gfx::Point& start, const gfx::Point& end); 176 void SelectRange(const gfx::Point& start, const gfx::Point& end);
174 177
175 void MoveCaret(const gfx::Point& point); 178 void MoveCaret(const gfx::Point& point);
176 179
177 private: 180 private:
181 void BuffersSwapped(const gpu::Mailbox& mailbox,
182 const gfx::Size size,
183 const base::Closure& ack_callback);
184
178 // The model object. 185 // The model object.
179 RenderWidgetHostImpl* host_; 186 RenderWidgetHostImpl* host_;
180 187
181 // Whether or not this widget is potentially attached to the view hierarchy. 188 // Whether or not this widget is potentially attached to the view hierarchy.
182 // This view may not actually be attached if this is true, but it should be 189 // This view may not actually be attached if this is true, but it should be
183 // treated as such, because as soon as a ContentViewCore is set the layer 190 // treated as such, because as soon as a ContentViewCore is set the layer
184 // will be attached automatically. 191 // will be attached automatically.
185 bool is_layer_attached_; 192 bool is_layer_attached_;
186 193
187 // ContentViewCoreImpl is our interface to the view system. 194 // ContentViewCoreImpl is our interface to the view system.
(...skipping 14 matching lines...) Expand all
202 209
203 // The most recent texture id that was pushed to the texture layer. 210 // The most recent texture id that was pushed to the texture layer.
204 unsigned int texture_id_in_layer_; 211 unsigned int texture_id_in_layer_;
205 212
206 // The most recent texture size that was pushed to the texture layer. 213 // The most recent texture size that was pushed to the texture layer.
207 gfx::Size texture_size_in_layer_; 214 gfx::Size texture_size_in_layer_;
208 215
209 // Used for image transport when needing to share resources across threads. 216 // Used for image transport when needing to share resources across threads.
210 scoped_ptr<SurfaceTextureTransportClient> surface_texture_transport_; 217 scoped_ptr<SurfaceTextureTransportClient> surface_texture_transport_;
211 218
212 // The mailbox name of the previously received frame. 219 // The mailbox of the previously received frame.
213 std::string current_mailbox_name_; 220 gpu::Mailbox current_mailbox_;
214 221
215 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 222 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
216 }; 223 };
217 224
218 } // namespace content 225 } // namespace content
219 226
220 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 227 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698