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/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" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 size_t BackingStoreWin::MemorySize() { | 112 size_t BackingStoreWin::MemorySize() { |
113 return size().GetArea() * (color_depth_ / 8); | 113 return size().GetArea() * (color_depth_ / 8); |
114 } | 114 } |
115 | 115 |
116 void BackingStoreWin::PaintToBackingStore( | 116 void BackingStoreWin::PaintToBackingStore( |
117 content::RenderProcessHost* process, | 117 content::RenderProcessHost* process, |
118 TransportDIB::Id bitmap, | 118 TransportDIB::Id bitmap, |
119 const gfx::Rect& bitmap_rect, | 119 const gfx::Rect& bitmap_rect, |
120 const std::vector<gfx::Rect>& copy_rects, | 120 const std::vector<gfx::Rect>& copy_rects, |
| 121 float scale_factor, |
121 const base::Closure& completion_callback, | 122 const base::Closure& completion_callback, |
122 bool* scheduled_completion_callback) { | 123 bool* scheduled_completion_callback) { |
123 *scheduled_completion_callback = false; | 124 *scheduled_completion_callback = false; |
124 if (!backing_store_dib_) { | 125 if (!backing_store_dib_) { |
125 backing_store_dib_ = CreateDIB(hdc_, size().width(), | 126 backing_store_dib_ = CreateDIB(hdc_, size().width(), |
126 size().height(), color_depth_); | 127 size().height(), color_depth_); |
127 if (!backing_store_dib_) { | 128 if (!backing_store_dib_) { |
128 NOTREACHED(); | 129 NOTREACHED(); |
129 return; | 130 return; |
130 } | 131 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 171 |
171 void BackingStoreWin::ScrollBackingStore(int dx, int dy, | 172 void BackingStoreWin::ScrollBackingStore(int dx, int dy, |
172 const gfx::Rect& clip_rect, | 173 const gfx::Rect& clip_rect, |
173 const gfx::Size& view_size) { | 174 const gfx::Size& view_size) { |
174 RECT damaged_rect, r = clip_rect.ToRECT(); | 175 RECT damaged_rect, r = clip_rect.ToRECT(); |
175 ScrollDC(hdc_, dx, dy, NULL, &r, NULL, &damaged_rect); | 176 ScrollDC(hdc_, dx, dy, NULL, &r, NULL, &damaged_rect); |
176 | 177 |
177 // TODO(darin): this doesn't work if dx and dy are both non-zero! | 178 // TODO(darin): this doesn't work if dx and dy are both non-zero! |
178 DCHECK(dx == 0 || dy == 0); | 179 DCHECK(dx == 0 || dy == 0); |
179 } | 180 } |
OLD | NEW |