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

Side by Side Diff: content/renderer/render_widget.h

Issue 12328080: Plumb physical backing size from RWHV to renderer CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fetch device scale directly in RWVHBase 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
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_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); 261 void DoDeferredSetWindowRect(const WebKit::WebRect& pos);
262 virtual void Composite(); 262 virtual void Composite();
263 263
264 // Set the background of the render widget to a bitmap. The bitmap will be 264 // Set the background of the render widget to a bitmap. The bitmap will be
265 // tiled in both directions if it isn't big enough to fill the area. This is 265 // tiled in both directions if it isn't big enough to fill the area. This is
266 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). 266 // mainly intended to be used in conjuction with WebView::SetIsTransparent().
267 virtual void SetBackground(const SkBitmap& bitmap); 267 virtual void SetBackground(const SkBitmap& bitmap);
268 268
269 // Resizes the render widget. 269 // Resizes the render widget.
270 void Resize(const gfx::Size& new_size, 270 void Resize(const gfx::Size& new_size,
271 const gfx::Size& physical_backing_size,
271 const gfx::Rect& resizer_rect, 272 const gfx::Rect& resizer_rect,
272 bool is_fullscreen, 273 bool is_fullscreen,
273 ResizeAck resize_ack); 274 ResizeAck resize_ack);
274 275
275 // RenderWidget IPC message handlers 276 // RenderWidget IPC message handlers
276 void OnClose(); 277 void OnClose();
277 void OnCreatingNewAck(); 278 void OnCreatingNewAck();
278 virtual void OnResize(const gfx::Size& new_size, 279 virtual void OnResize(const gfx::Size& new_size,
280 const gfx::Size& physical_backing_size,
279 const gfx::Rect& resizer_rect, 281 const gfx::Rect& resizer_rect,
280 bool is_fullscreen); 282 bool is_fullscreen);
281 void OnChangeResizeRect(const gfx::Rect& resizer_rect); 283 void OnChangeResizeRect(const gfx::Rect& resizer_rect);
282 virtual void OnWasHidden(); 284 virtual void OnWasHidden();
283 virtual void OnWasShown(bool needs_repainting); 285 virtual void OnWasShown(bool needs_repainting);
284 virtual void OnWasSwappedOut(); 286 virtual void OnWasSwappedOut();
285 void OnUpdateRectAck(); 287 void OnUpdateRectAck();
286 void OnCreateVideoAck(int32 video_id); 288 void OnCreateVideoAck(int32 video_id);
287 void OnUpdateVideoAck(int32 video_id); 289 void OnUpdateVideoAck(int32 video_id);
288 void OnRequestMoveAck(); 290 void OnRequestMoveAck();
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 WebCursor current_cursor_; 494 WebCursor current_cursor_;
493 495
494 // The size of the RenderWidget. 496 // The size of the RenderWidget.
495 gfx::Size size_; 497 gfx::Size size_;
496 498
497 // The TransportDIB that is being used to transfer an image to the browser. 499 // The TransportDIB that is being used to transfer an image to the browser.
498 TransportDIB* current_paint_buf_; 500 TransportDIB* current_paint_buf_;
499 501
500 PaintAggregator paint_aggregator_; 502 PaintAggregator paint_aggregator_;
501 503
504 // The size of the view's backing surface in non-DPI-adjusted pixels.
505 gfx::Size physical_backing_size_;
506
502 // The area that must be reserved for drawing the resize corner. 507 // The area that must be reserved for drawing the resize corner.
503 gfx::Rect resizer_rect_; 508 gfx::Rect resizer_rect_;
504 509
505 // Flags for the next ViewHostMsg_UpdateRect message. 510 // Flags for the next ViewHostMsg_UpdateRect message.
506 int next_paint_flags_; 511 int next_paint_flags_;
507 512
508 // Filtered time per frame based on UpdateRect messages. 513 // Filtered time per frame based on UpdateRect messages.
509 float filtered_time_per_frame_; 514 float filtered_time_per_frame_;
510 515
511 // True if we are expecting an UpdateRect_ACK message (i.e., that a 516 // True if we are expecting an UpdateRect_ACK message (i.e., that a
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 659
655 // Specified whether the compositor will run in its own thread. 660 // Specified whether the compositor will run in its own thread.
656 bool is_threaded_compositing_enabled_; 661 bool is_threaded_compositing_enabled_;
657 662
658 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 663 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
659 }; 664 };
660 665
661 } // namespace content 666 } // namespace content
662 667
663 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 668 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698