| 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 8544127572261b50c5d3c05d700d1c03d2c5c13a..8539fe663c5596101958d19bfaa0a28bd1c075ad 100644
|
| --- a/ui/native_theme/native_theme_win.cc
|
| +++ b/ui/native_theme/native_theme_win.cc
|
| @@ -720,12 +720,7 @@ void NativeThemeWin::PaintIndirect(SkCanvas* canvas,
|
| // Draw the theme controls using existing HDC-drawing code.
|
| PaintDirect(&offscreen_canvas, part, state, adjusted_rect, adjusted_extra);
|
|
|
| - // Copy the pixels to a bitmap that has ref-counted pixel storage, which is
|
| - // necessary to have when drawing to a SkPicture.
|
| - const SkBitmap& hdc_bitmap =
|
| - offscreen_canvas.getDevice()->accessBitmap(false);
|
| - SkBitmap bitmap;
|
| - hdc_bitmap.copyTo(&bitmap, kN32_SkColorType);
|
| + SkBitmap bitmap = skia::ReadPixels(&offscreen_canvas);
|
|
|
| // Post-process the pixels to fix up the alpha values (see big comment above).
|
| const SkPMColor placeholder_value = SkPreMultiplyColor(placeholder);
|
|
|