Chromium Code Reviews| Index: ui/native_theme/native_theme_win.cc |
| diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc |
| index adc73210bbb471d61e78038d6a6080cabe440473..69658a01218e3e2c3dab89408ecf30eb99a4fc85 100644 |
| --- a/ui/native_theme/native_theme_win.cc |
| +++ b/ui/native_theme/native_theme_win.cc |
| @@ -75,7 +75,9 @@ void SetCheckerboardShader(SkPaint* paint, const RECT& align_rect) { |
| SkBitmap temp_bitmap; |
| temp_bitmap.installPixels(info, buffer, info.minRowBytes()); |
| SkBitmap bitmap; |
| - temp_bitmap.copyTo(&bitmap); |
| + if (bitmap.tryAllocPixels(info)) { |
| + temp_bitmap.readPixels(info, bitmap.getPixels(), bitmap.rowBytes(), 0, 0); |
| + } |
|
Evan Stade
2017/05/02 23:25:42
nit: no curlies
msarett1
2017/05/03 02:40:18
Done.
|
| // Align the pattern with the upper corner of |align_rect|. |
| SkMatrix local_matrix; |