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

Unified Diff: src/views/sdl/SkOSWindow_SDL.cpp

Issue 308683005: setConfig -> setInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: missed one setConfig (release only) Created 6 years, 7 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
« no previous file with comments | « src/utils/SkPictureUtils.cpp ('k') | tests/BitmapCopyTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/sdl/SkOSWindow_SDL.cpp
diff --git a/src/views/sdl/SkOSWindow_SDL.cpp b/src/views/sdl/SkOSWindow_SDL.cpp
index 2a1fae28a6efa10813003127cd6e607fd5769eb5..27783d41fc736b6d346e5798a89a5ff82b0b51e3 100644
--- a/src/views/sdl/SkOSWindow_SDL.cpp
+++ b/src/views/sdl/SkOSWindow_SDL.cpp
@@ -23,22 +23,23 @@ static void post_SkEvent_event() {
}
static bool skia_setBitmapFromSurface(SkBitmap* dst, SDL_Surface* src) {
- SkBitmap::Config config;
+ SkColorType ct;
+ SkAlphaType at;
switch (src->format->BytesPerPixel) {
case 2:
- config = SkBitmap::kRGB_565_Config;
+ ct = kRGB_565_SkColorType;
+ at = kOpaque_SkAlphaType;
break;
case 4:
- config = SkBitmap::kARGB_8888_Config;
+ ct = kN32_SkColorType;
+ at = kPremul_SkAlphaType;
break;
default:
return false;
}
- dst->setConfig(config, src->w, src->h, src->pitch);
- dst->setPixels(src->pixels);
- return true;
+ return dst->installPixels(SkImageInfo::Make(src->w, src->h, ct, at), src->pixels, src->pitch);
}
SkOSWindow::SkOSWindow(void* screen) {
« no previous file with comments | « src/utils/SkPictureUtils.cpp ('k') | tests/BitmapCopyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698