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

Side by Side Diff: content/browser/renderer_host/backing_store_win.cc

Issue 23769011: Move a bunch of windows stuff from ui/base/win to ui/gfx/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar bustage. Created 7 years, 3 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/browser/renderer_host/backing_store_win.h" 5 #include "content/browser/renderer_host/backing_store_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 #include "content/browser/renderer_host/render_widget_host_impl.h" 9 #include "content/browser/renderer_host/render_widget_host_impl.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
11 #include "skia/ext/platform_canvas.h" 11 #include "skia/ext/platform_canvas.h"
12 #include "ui/gfx/dpi_win.h"
13 #include "ui/gfx/gdi_util.h" 12 #include "ui/gfx/gdi_util.h"
14 #include "ui/gfx/rect_conversions.h" 13 #include "ui/gfx/rect_conversions.h"
15 #include "ui/gfx/size_conversions.h" 14 #include "ui/gfx/size_conversions.h"
15 #include "ui/gfx/win/dpi.h"
16 #include "ui/surface/transport_dib.h" 16 #include "ui/surface/transport_dib.h"
17 17
18 namespace content { 18 namespace content {
19 namespace { 19 namespace {
20 20
21 // Creates a dib conforming to the height/width/section parameters passed in. 21 // Creates a dib conforming to the height/width/section parameters passed in.
22 HANDLE CreateDIB(HDC dc, int width, int height, int color_depth) { 22 HANDLE CreateDIB(HDC dc, int width, int height, int color_depth) {
23 BITMAPV5HEADER hdr = {0}; 23 BITMAPV5HEADER hdr = {0};
24 ZeroMemory(&hdr, sizeof(BITMAPV5HEADER)); 24 ZeroMemory(&hdr, sizeof(BITMAPV5HEADER));
25 25
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 float scale = gfx::win::GetDeviceScaleFactor(); 177 float scale = gfx::win::GetDeviceScaleFactor();
178 gfx::Rect screen_rect = gfx::ToEnclosingRect( 178 gfx::Rect screen_rect = gfx::ToEnclosingRect(
179 gfx::ScaleRect(clip_rect, scale)); 179 gfx::ScaleRect(clip_rect, scale));
180 int dx = static_cast<int>(delta.x() * scale); 180 int dx = static_cast<int>(delta.x() * scale);
181 int dy = static_cast<int>(delta.y() * scale); 181 int dy = static_cast<int>(delta.y() * scale);
182 RECT damaged_rect, r = screen_rect.ToRECT(); 182 RECT damaged_rect, r = screen_rect.ToRECT();
183 ScrollDC(hdc_, dx, dy, NULL, &r, NULL, &damaged_rect); 183 ScrollDC(hdc_, dx, dy, NULL, &r, NULL, &damaged_rect);
184 } 184 }
185 185
186 } // namespace content 186 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_service_impl.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698