diff options
author | 2014-05-29 21:10:32 +0000 | |
---|---|---|
committer | 2014-05-29 21:10:32 +0000 | |
commit | d0f824cfbd8951bb948b19d7ff5dce028ce557a5 (patch) | |
tree | 4698434f439e248887ed732ce445ca036edb16b3 /src/views/sdl/SkOSWindow_SDL.cpp | |
parent | 986d681f3e7a7eb6febd9df9fe21a8d277ba2296 (diff) |
Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)
Reason for revert:
broke all Windows bots
Original issue's description:
> setConfig -> setInfo
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14978
R=robertphillips@google.com, reed@google.com
TBR=reed@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: epoger@google.com
Review URL: https://codereview.chromium.org/302053002
git-svn-id: http://skia.googlecode.com/svn/trunk@14979 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/views/sdl/SkOSWindow_SDL.cpp')
-rw-r--r-- | src/views/sdl/SkOSWindow_SDL.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/views/sdl/SkOSWindow_SDL.cpp b/src/views/sdl/SkOSWindow_SDL.cpp index 27783d41fc..2a1fae28a6 100644 --- a/src/views/sdl/SkOSWindow_SDL.cpp +++ b/src/views/sdl/SkOSWindow_SDL.cpp @@ -23,23 +23,22 @@ static void post_SkEvent_event() { } static bool skia_setBitmapFromSurface(SkBitmap* dst, SDL_Surface* src) { - SkColorType ct; - SkAlphaType at; + SkBitmap::Config config; switch (src->format->BytesPerPixel) { case 2: - ct = kRGB_565_SkColorType; - at = kOpaque_SkAlphaType; + config = SkBitmap::kRGB_565_Config; break; case 4: - ct = kN32_SkColorType; - at = kPremul_SkAlphaType; + config = SkBitmap::kARGB_8888_Config; break; default: return false; } - return dst->installPixels(SkImageInfo::Make(src->w, src->h, ct, at), src->pixels, src->pitch); + dst->setConfig(config, src->w, src->h, src->pitch); + dst->setPixels(src->pixels); + return true; } SkOSWindow::SkOSWindow(void* screen) { |