| Index: content/browser/renderer_host/backing_store_win.cc
|
| diff --git a/content/browser/renderer_host/backing_store_win.cc b/content/browser/renderer_host/backing_store_win.cc
|
| index c9ce07a86bb51564fb08af9a96ac05132395fe6e..e1ceb2a0ed6a4fbbde77131042e2e2e1ccc6fb0a 100644
|
| --- a/content/browser/renderer_host/backing_store_win.cc
|
| +++ b/content/browser/renderer_host/backing_store_win.cc
|
| @@ -46,29 +46,6 @@ HANDLE CreateDIB(HDC dc, int width, int height, int color_depth) {
|
| return dib;
|
| }
|
|
|
| -void CallStretchDIBits(HDC hdc, int dest_x, int dest_y, int dest_w, int dest_h,
|
| - int src_x, int src_y, int src_w, int src_h, void* pixels,
|
| - const BITMAPINFO* bitmap_info) {
|
| - // When blitting a rectangle that touches the bottom, left corner of the
|
| - // bitmap, StretchDIBits looks at it top-down! For more details, see
|
| - // http://wiki.allegro.cc/index.php?title=StretchDIBits.
|
| - int rv;
|
| - int bitmap_h = -bitmap_info->bmiHeader.biHeight;
|
| - int bottom_up_src_y = bitmap_h - src_y - src_h;
|
| - if (bottom_up_src_y == 0 && src_x == 0 && src_h != bitmap_h) {
|
| - rv = StretchDIBits(hdc,
|
| - dest_x, dest_h + dest_y - 1, dest_w, -dest_h,
|
| - src_x, bitmap_h - src_y + 1, src_w, -src_h,
|
| - pixels, bitmap_info, DIB_RGB_COLORS, SRCCOPY);
|
| - } else {
|
| - rv = StretchDIBits(hdc,
|
| - dest_x, dest_y, dest_w, dest_h,
|
| - src_x, bottom_up_src_y, src_w, src_h,
|
| - pixels, bitmap_info, DIB_RGB_COLORS, SRCCOPY);
|
| - }
|
| - DCHECK(rv != GDI_ERROR);
|
| -}
|
| -
|
| } // namespace
|
|
|
| BackingStoreWin::BackingStoreWin(RenderWidgetHost* widget,
|
| @@ -151,17 +128,17 @@ void BackingStoreWin::PaintToBackingStore(
|
| gfx::Rect paint_rect = gfx::IntersectRects(view_rect, copy_rects[i]);
|
| gfx::Rect pixel_copy_rect = gfx::ToEnclosedRect(
|
| gfx::ScaleRect(paint_rect, scale_factor));
|
| - CallStretchDIBits(hdc_,
|
| - paint_rect.x(),
|
| - paint_rect.y(),
|
| - paint_rect.width(),
|
| - paint_rect.height(),
|
| - pixel_copy_rect.x() - pixel_bitmap_rect.x(),
|
| - pixel_copy_rect.y() - pixel_bitmap_rect.y(),
|
| - pixel_copy_rect.width(),
|
| - pixel_copy_rect.height(),
|
| - dib->memory(),
|
| - reinterpret_cast<BITMAPINFO*>(&hdr));
|
| + gfx::StretchDIBits(hdc_,
|
| + paint_rect.x(),
|
| + paint_rect.y(),
|
| + paint_rect.width(),
|
| + paint_rect.height(),
|
| + pixel_copy_rect.x() - pixel_bitmap_rect.x(),
|
| + pixel_copy_rect.y() - pixel_bitmap_rect.y(),
|
| + pixel_copy_rect.width(),
|
| + pixel_copy_rect.height(),
|
| + dib->memory(),
|
| + reinterpret_cast<BITMAPINFO*>(&hdr));
|
| }
|
| }
|
|
|
|
|