OLD | NEW |
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/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <InputScope.h> | 7 #include <InputScope.h> |
8 #include <wtsapi32.h> | 8 #include <wtsapi32.h> |
9 #pragma comment(lib, "wtsapi32.lib") | 9 #pragma comment(lib, "wtsapi32.lib") |
10 | 10 |
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1403 DrawBackground(paint_dc.m_ps.rcPaint, &paint_dc); | 1403 DrawBackground(paint_dc.m_ps.rcPaint, &paint_dc); |
1404 if (whiteout_start_time_.is_null()) | 1404 if (whiteout_start_time_.is_null()) |
1405 whiteout_start_time_ = TimeTicks::Now(); | 1405 whiteout_start_time_ = TimeTicks::Now(); |
1406 } | 1406 } |
1407 } | 1407 } |
1408 | 1408 |
1409 void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect, | 1409 void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect, |
1410 CPaintDC* dc) { | 1410 CPaintDC* dc) { |
1411 if (!background_.empty()) { | 1411 if (!background_.empty()) { |
1412 gfx::Rect dirty_area(dirty_rect); | 1412 gfx::Rect dirty_area(dirty_rect); |
1413 gfx::Canvas canvas(dirty_area.size(), 1.0f, true); | 1413 gfx::Canvas canvas(dirty_area.size(), ui::SCALE_FACTOR_100P, true); |
1414 canvas.Translate(-dirty_area.OffsetFromOrigin()); | 1414 canvas.Translate(-dirty_area.OffsetFromOrigin()); |
1415 | 1415 |
1416 gfx::Rect dc_rect(dc->m_ps.rcPaint); | 1416 gfx::Rect dc_rect(dc->m_ps.rcPaint); |
1417 // TODO(pkotwicz): Fix |background_| such that it is an ImageSkia. | 1417 // TODO(pkotwicz): Fix |background_| such that it is an ImageSkia. |
1418 canvas.TileImageInt(gfx::ImageSkia::CreateFrom1xBitmap(background_), | 1418 canvas.TileImageInt(gfx::ImageSkia::CreateFrom1xBitmap(background_), |
1419 0, 0, dc_rect.width(), dc_rect.height()); | 1419 0, 0, dc_rect.width(), dc_rect.height()); |
1420 | 1420 |
1421 skia::DrawToNativeContext(canvas.sk_canvas(), *dc, dirty_area.x(), | 1421 skia::DrawToNativeContext(canvas.sk_canvas(), *dc, dirty_area.x(), |
1422 dirty_area.y(), NULL); | 1422 dirty_area.y(), NULL); |
1423 } else { | 1423 } else { |
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3181 return new RenderWidgetHostViewWin(widget); | 3181 return new RenderWidgetHostViewWin(widget); |
3182 } | 3182 } |
3183 | 3183 |
3184 // static | 3184 // static |
3185 void RenderWidgetHostViewPort::GetDefaultScreenInfo( | 3185 void RenderWidgetHostViewPort::GetDefaultScreenInfo( |
3186 WebKit::WebScreenInfo* results) { | 3186 WebKit::WebScreenInfo* results) { |
3187 GetScreenInfoForWindow(0, results); | 3187 GetScreenInfoForWindow(0, results); |
3188 } | 3188 } |
3189 | 3189 |
3190 } // namespace content | 3190 } // namespace content |
OLD | NEW |