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

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

Issue 10537067: mac: Basic HighDPI implementation for web contents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: done Created 8 years, 6 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 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 animation_update_pending_(false), 107 animation_update_pending_(false),
108 invalidation_task_posted_(false), 108 invalidation_task_posted_(false),
109 screen_info_(screen_info), 109 screen_info_(screen_info),
110 device_scale_factor_(1), 110 device_scale_factor_(1),
111 invert_(false) { 111 invert_(false) {
112 if (!swapped_out) 112 if (!swapped_out)
113 RenderProcess::current()->AddRefProcess(); 113 RenderProcess::current()->AddRefProcess();
114 DCHECK(RenderThread::Get()); 114 DCHECK(RenderThread::Get());
115 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch( 115 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch(
116 switches::kDisableGpuVsync); 116 switches::kDisableGpuVsync);
117 #if defined(OS_CHROMEOS) 117 #if defined(OS_CHROMEOS) || defined(OS_MACOSX)
118 device_scale_factor_ = screen_info.verticalDPI / kStandardDPI; 118 device_scale_factor_ = screen_info.verticalDPI / kStandardDPI;
119 #endif 119 #endif
120 } 120 }
121 121
122 RenderWidget::~RenderWidget() { 122 RenderWidget::~RenderWidget() {
123 DCHECK(!webwidget_) << "Leaking our WebWidget!"; 123 DCHECK(!webwidget_) << "Leaking our WebWidget!";
124 STLDeleteElements(&updates_pending_swap_); 124 STLDeleteElements(&updates_pending_swap_);
125 if (current_paint_buf_) { 125 if (current_paint_buf_) {
126 RenderProcess::current()->ReleaseTransportDIB(current_paint_buf_); 126 RenderProcess::current()->ReleaseTransportDIB(current_paint_buf_);
127 current_paint_buf_ = NULL; 127 current_paint_buf_ = NULL;
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 } 1733 }
1734 } 1734 }
1735 1735
1736 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1736 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1737 return false; 1737 return false;
1738 } 1738 }
1739 1739
1740 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1740 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1741 return false; 1741 return false;
1742 } 1742 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698