| Index: chrome/browser/ui/webui/app_launcher_login_handler.cc
|
| diff --git a/chrome/browser/ui/webui/app_launcher_login_handler.cc b/chrome/browser/ui/webui/app_launcher_login_handler.cc
|
| index ee7a3f257a2c6f19ea0c0e43c99bffcb34116c36..290b6c3d3d6a798f1441bc4001b81fb327281ae9 100644
|
| --- a/chrome/browser/ui/webui/app_launcher_login_handler.cc
|
| +++ b/chrome/browser/ui/webui/app_launcher_login_handler.cc
|
| @@ -46,6 +46,7 @@
|
| #include "ui/base/webui/web_ui_util.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/image/image.h"
|
| +#include "ui/gfx/skia_util.h"
|
|
|
| using content::OpenURLParams;
|
| using content::Referrer;
|
| @@ -59,14 +60,15 @@ SkBitmap GetGAIAPictureForNTP(const gfx::Image& image) {
|
| SkBitmap bmp = skia::ImageOperations::Resize(*image.ToSkBitmap(),
|
| skia::ImageOperations::RESIZE_BEST, kLength, kLength);
|
|
|
| - gfx::Canvas canvas(gfx::Size(kLength, kLength), 1.0f, false);
|
| - canvas.DrawImageInt(gfx::ImageSkia::CreateFrom1xBitmap(bmp), 0, 0);
|
| -
|
| // Draw a gray border on the inside of the icon.
|
| - SkColor color = SkColorSetARGB(83, 0, 0, 0);
|
| - canvas.DrawRect(gfx::Rect(0, 0, kLength - 1, kLength - 1), color);
|
| -
|
| - return canvas.ExtractImageRep().sk_bitmap();
|
| + sk_sp<SkSurface> surface =
|
| + SkSurface::MakeRasterDirect(bmp.info(), bmp.getPixels(), bmp.rowBytes());
|
| + SkPaint paint;
|
| + paint.setColor(SkColorSetARGB(83, 0, 0, 0));
|
| + paint.setStyle(SkPaint::kStroke_Style);
|
| + surface->getCanvas()->drawRect(
|
| + gfx::RectToSkRect(gfx::Rect(kLength - 1, kLength - 1)), paint);
|
| + return bmp;
|
| }
|
|
|
| // Puts the |content| into an element with the given CSS class.
|
|
|