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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_mac.h

Issue 5317007: Add flow control between renderer and GPU processes, and, on Mac OS X,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 #import <QuartzCore/CALayer.h> 10 #import <QuartzCore/CALayer.h>
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 virtual void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window, 237 virtual void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window,
238 int32 width, 238 int32 width,
239 int32 height, 239 int32 height,
240 uint64 io_surface_identifier); 240 uint64 io_surface_identifier);
241 virtual void AcceleratedSurfaceSetTransportDIB( 241 virtual void AcceleratedSurfaceSetTransportDIB(
242 gfx::PluginWindowHandle window, 242 gfx::PluginWindowHandle window,
243 int32 width, 243 int32 width,
244 int32 height, 244 int32 height,
245 TransportDIB::Handle transport_dib); 245 TransportDIB::Handle transport_dib);
246 virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window, 246 virtual void AcceleratedSurfaceBuffersSwapped(
247 uint64 surface_id); 247 gfx::PluginWindowHandle window,
248 uint64 surface_id,
249 int32 renderer_id,
250 int32 route_id,
251 uint64 swap_buffers_count);
248 virtual void GpuRenderingStateDidChange(); 252 virtual void GpuRenderingStateDidChange();
249 void DrawAcceleratedSurfaceInstance( 253 void DrawAcceleratedSurfaceInstance(
250 CGLContextObj context, 254 CGLContextObj context,
251 gfx::PluginWindowHandle plugin_handle, 255 gfx::PluginWindowHandle plugin_handle,
252 NSSize size); 256 NSSize size);
253 // Forces the textures associated with any accelerated plugin instances 257 // Forces the textures associated with any accelerated plugin instances
254 // to be reloaded. 258 // to be reloaded.
255 void ForceTextureReload(); 259 void ForceTextureReload();
256 260
257 virtual void SetVisuallyDeemphasized(bool deemphasized); 261 virtual void SetVisuallyDeemphasized(bool deemphasized);
258 262
259 void KillSelf(); 263 void KillSelf();
260 264
261 void SetTextInputActive(bool active); 265 void SetTextInputActive(bool active);
262 266
263 // Sends confirmed plugin IME text back to the renderer. 267 // Sends confirmed plugin IME text back to the renderer.
264 void PluginImeCompositionConfirmed(const string16& text, int plugin_id); 268 void PluginImeCompositionConfirmed(const string16& text, int plugin_id);
265 269
266 const std::string& selected_text() const { return selected_text_; } 270 const std::string& selected_text() const { return selected_text_; }
267 271
268 void UpdateRootGpuViewVisibility(bool show_gpu_widget); 272 void UpdateRootGpuViewVisibility(bool show_gpu_widget);
269 273
270 // When rendering transitions from gpu to software, the gpu widget can't be 274 // When rendering transitions from gpu to software, the gpu widget can't be
271 // hidden until the software backing store has been updated. This method 275 // hidden until the software backing store has been updated. This method
272 // checks if the GPU view needs to be hidden and hides it if necessary. It 276 // checks if the GPU view needs to be hidden and hides it if necessary. It
273 // should be called after the software backing store has been painted to. 277 // should be called after the software backing store has been painted to.
274 void HandleDelayedGpuViewHiding(); 278 void HandleDelayedGpuViewHiding();
275 279
280 // This is called from the display link thread, and provides the GPU
281 // process a notion of how quickly the browser is able to keep up with it.
282 void AcknowledgeSwapBuffers(int renderer_id,
283 int32 route_id,
284 uint64 swap_buffers_count);
285
276 // These member variables should be private, but the associated ObjC class 286 // These member variables should be private, but the associated ObjC class
277 // needs access to them and can't be made a friend. 287 // needs access to them and can't be made a friend.
278 288
279 // The associated Model. Can be NULL if Destroy() is called when 289 // The associated Model. Can be NULL if Destroy() is called when
280 // someone (other than superview) has retained |cocoa_view_|. 290 // someone (other than superview) has retained |cocoa_view_|.
281 RenderWidgetHost* render_widget_host_; 291 RenderWidgetHost* render_widget_host_;
282 292
283 // This is true when we are currently painting and thus should handle extra 293 // This is true when we are currently painting and thus should handle extra
284 // paint requests by expanding the invalid rect rather than actually painting. 294 // paint requests by expanding the invalid rect rather than actually painting.
285 bool about_to_validate_and_paint_; 295 bool about_to_validate_and_paint_;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 360
351 // When rendering transitions from gpu to software, the gpu widget can't be 361 // When rendering transitions from gpu to software, the gpu widget can't be
352 // hidden until the software backing store has been updated. This variable is 362 // hidden until the software backing store has been updated. This variable is
353 // set when the gpu widget needs to be hidden once a paint is completed. 363 // set when the gpu widget needs to be hidden once a paint is completed.
354 bool needs_gpu_visibility_update_after_repaint_; 364 bool needs_gpu_visibility_update_after_repaint_;
355 365
356 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 366 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
357 }; 367 };
358 368
359 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 369 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698