Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Unified Diff: ui/native_theme/native_theme_win.cc

Issue 361643002: setConfig is deprecated, use setInfo or allocPixels instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't call allocPixels+rowbytes yet (skia bug) Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 5bd78f3558f639b2363bd890df71f083de6b3b4a..16e47cb34f80f4ad1ed10e8a4b322ccb3ea5a4fa 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -82,9 +82,9 @@ void SetCheckerboardShader(SkPaint* paint, const RECT& align_rect) {
// function returns. The copy will copy the pixel data into a place owned by
// the bitmap, which is in turn owned by the shader, etc., so it will live
// until we're done using it.
+ SkImageInfo info = SkImageInfo::MakeN32Premul(2, 2);
SkBitmap temp_bitmap;
- temp_bitmap.setConfig(SkBitmap::kARGB_8888_Config, 2, 2);
- temp_bitmap.setPixels(buffer);
+ temp_bitmap.installPixels(info, buffer, info.minRowBytes());
SkBitmap bitmap;
temp_bitmap.copyTo(&bitmap);
@@ -706,7 +706,7 @@ void NativeThemeWin::PaintIndirect(SkCanvas* canvas,
const SkBitmap& hdc_bitmap =
offscreen_canvas.getDevice()->accessBitmap(false);
SkBitmap bitmap;
- hdc_bitmap.copyTo(&bitmap, kPMColor_SkColorType);
+ hdc_bitmap.copyTo(&bitmap, kN32_SkColorType);
// Post-process the pixels to fix up the alpha values (see big comment above).
const SkPMColor placeholder_value = SkPreMultiplyColor(placeholder);
« no previous file with comments | « ui/message_center/views/notification_view_unittest.cc ('k') | ui/ozone/platform/caca/caca_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698