| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "SkWindow.h" | 8 #include "SkWindow.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkDevice.h" | 10 #include "SkDevice.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 if (localR) { | 127 if (localR) { |
| 128 SkRect devR; | 128 SkRect devR; |
| 129 SkMatrix inverse; | 129 SkMatrix inverse; |
| 130 if (!fMatrix.invert(&inverse)) { | 130 if (!fMatrix.invert(&inverse)) { |
| 131 return false; | 131 return false; |
| 132 } | 132 } |
| 133 fMatrix.mapRect(&devR, *localR); | 133 fMatrix.mapRect(&devR, *localR); |
| 134 devR.round(&ir); | 134 devR.round(&ir); |
| 135 } else { | 135 } else { |
| 136 ir.set(0, 0, | 136 ir.set(0, 0, |
| 137 SkScalarRound(this->width()), | 137 SkScalarRoundToInt(this->width()), |
| 138 SkScalarRound(this->height())); | 138 SkScalarRoundToInt(this->height())); |
| 139 } | 139 } |
| 140 fDirtyRgn.op(ir, SkRegion::kUnion_Op); | 140 fDirtyRgn.op(ir, SkRegion::kUnion_Op); |
| 141 | 141 |
| 142 this->onHandleInval(ir); | 142 this->onHandleInval(ir); |
| 143 return true; | 143 return true; |
| 144 } | 144 } |
| 145 | 145 |
| 146 void SkWindow::forceInvalAll() { | 146 void SkWindow::forceInvalAll() { |
| 147 fDirtyRgn.setRect(0, 0, | 147 fDirtyRgn.setRect(0, 0, |
| 148 SkScalarCeil(this->width()), | 148 SkScalarCeilToInt(this->width()), |
| 149 SkScalarCeil(this->height())); | 149 SkScalarCeilToInt(this->height())); |
| 150 } | 150 } |
| 151 | 151 |
| 152 #if defined(SK_BUILD_FOR_WINCE) && defined(USE_GX_SCREEN) | 152 #if defined(SK_BUILD_FOR_WINCE) && defined(USE_GX_SCREEN) |
| 153 #include <windows.h> | 153 #include <windows.h> |
| 154 #include <gx.h> | 154 #include <gx.h> |
| 155 extern GXDisplayProperties gDisplayProps; | 155 extern GXDisplayProperties gDisplayProps; |
| 156 #endif | 156 #endif |
| 157 | 157 |
| 158 #ifdef SK_SIMULATE_FAILED_MALLOC | 158 #ifdef SK_SIMULATE_FAILED_MALLOC |
| 159 extern bool gEnableControlledThrow; | 159 extern bool gEnableControlledThrow; |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 fClicks.remove(index); | 405 fClicks.remove(index); |
| 406 handled = true; | 406 handled = true; |
| 407 } | 407 } |
| 408 break; | 408 break; |
| 409 default: | 409 default: |
| 410 // Do nothing | 410 // Do nothing |
| 411 break; | 411 break; |
| 412 } | 412 } |
| 413 return handled; | 413 return handled; |
| 414 } | 414 } |
| OLD | NEW |