OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/gpu/gpu_view_win.h" | 5 #include "chrome/gpu/gpu_view_win.h" |
6 | 6 |
7 #include "chrome/common/gpu_messages.h" | 7 #include "chrome/common/gpu_messages.h" |
8 #include "chrome/gpu/gpu_backing_store_win.h" | 8 #include "chrome/gpu/gpu_backing_store_win.h" |
9 #include "chrome/gpu/gpu_thread.h" | 9 #include "chrome/gpu/gpu_thread.h" |
| 10 #include "gfx/rect.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 void DrawBackground(const RECT& dirty_rect, CPaintDC* dc) { | 14 void DrawBackground(const RECT& dirty_rect, CPaintDC* dc) { |
14 HBRUSH white_brush = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH)); | 15 HBRUSH white_brush = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH)); |
15 dc->FillRect(&dirty_rect, white_brush); | 16 dc->FillRect(&dirty_rect, white_brush); |
16 } | 17 } |
17 | 18 |
18 void DrawResizeCorner(const RECT& dirty_rect, HDC dc) { | 19 void DrawResizeCorner(const RECT& dirty_rect, HDC dc) { |
19 // TODO(brettw): implement this. | 20 // TODO(brettw): implement this. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 r.left = damaged_rect.x(); | 123 r.left = damaged_rect.x(); |
123 r.right = damaged_rect.right(); | 124 r.right = damaged_rect.right(); |
124 r.top = std::max(bitmap_rect.bottom(), damaged_rect.y()); | 125 r.top = std::max(bitmap_rect.bottom(), damaged_rect.y()); |
125 r.bottom = damaged_rect.bottom(); | 126 r.bottom = damaged_rect.bottom(); |
126 DrawBackground(r, &paint_dc); | 127 DrawBackground(r, &paint_dc); |
127 } | 128 } |
128 } else { | 129 } else { |
129 DrawBackground(paint_dc.m_ps.rcPaint, &paint_dc); | 130 DrawBackground(paint_dc.m_ps.rcPaint, &paint_dc); |
130 } | 131 } |
131 } | 132 } |
OLD | NEW |