| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "views/widget/root_view.h" | 5 #include "views/widget/root_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/drag_drop_types.h" | 9 #include "app/drag_drop_types.h" |
| 10 #include "app/gfx/canvas.h" | 10 #include "app/gfx/canvas.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 #endif | 152 #endif |
| 153 | 153 |
| 154 // Clip the invalid rect to our bounds. If a view is in a scrollview | 154 // Clip the invalid rect to our bounds. If a view is in a scrollview |
| 155 // it could be a lot larger | 155 // it could be a lot larger |
| 156 invalid_rect_ = GetScheduledPaintRectConstrainedToSize(); | 156 invalid_rect_ = GetScheduledPaintRectConstrainedToSize(); |
| 157 | 157 |
| 158 if (invalid_rect_.IsEmpty()) | 158 if (invalid_rect_.IsEmpty()) |
| 159 return; | 159 return; |
| 160 | 160 |
| 161 // Clear the background. | 161 // Clear the background. |
| 162 canvas->drawColor(SK_ColorBLACK, SkPorterDuff::kClear_Mode); | 162 canvas->drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); |
| 163 | 163 |
| 164 // Save the current transforms. | 164 // Save the current transforms. |
| 165 canvas->save(); | 165 canvas->save(); |
| 166 | 166 |
| 167 // Set the clip rect according to the invalid rect. | 167 // Set the clip rect according to the invalid rect. |
| 168 int clip_x = invalid_rect_.x() + x(); | 168 int clip_x = invalid_rect_.x() + x(); |
| 169 int clip_y = invalid_rect_.y() + y(); | 169 int clip_y = invalid_rect_.y() + y(); |
| 170 canvas->ClipRectInt(clip_x, clip_y, invalid_rect_.width(), | 170 canvas->ClipRectInt(clip_x, clip_y, invalid_rect_.width(), |
| 171 invalid_rect_.height()); | 171 invalid_rect_.height()); |
| 172 | 172 |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 previous_cursor_ = NULL; | 952 previous_cursor_ = NULL; |
| 953 } | 953 } |
| 954 #elif defined(OS_LINUX) | 954 #elif defined(OS_LINUX) |
| 955 gdk_window_set_cursor(GetWidget()->GetNativeView()->window, cursor); | 955 gdk_window_set_cursor(GetWidget()->GetNativeView()->window, cursor); |
| 956 if (cursor) | 956 if (cursor) |
| 957 gdk_cursor_destroy(cursor); | 957 gdk_cursor_destroy(cursor); |
| 958 #endif | 958 #endif |
| 959 } | 959 } |
| 960 | 960 |
| 961 } // namespace views | 961 } // namespace views |
| OLD | NEW |