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

Unified Diff: ppapi/shared_impl/ppb_image_data_shared.cc

Issue 23684065: GetNativeImageDataFormat: Return PP_IMAGEDATAFORMAT_RGBA_PREMUL in the case of SK_R32_SHIFT == 0 (… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding RGBA_PREMUL back in as an optional return from PPB_ImageData_Shared::GetNativeImageDataForma… Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_image_data_shared.cc
diff --git a/ppapi/shared_impl/ppb_image_data_shared.cc b/ppapi/shared_impl/ppb_image_data_shared.cc
index 50751a03829dc830c02f7ceb5de87da48e0cf858..c31bce43aab9e0d1d984476e9dfa7dc4240b9fb9 100644
--- a/ppapi/shared_impl/ppb_image_data_shared.cc
+++ b/ppapi/shared_impl/ppb_image_data_shared.cc
@@ -26,7 +26,12 @@ PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() {
NOTIMPLEMENTED();
return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
#else
- return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
+ if (SK_B32_SHIFT == 0)
+ return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
+ else if (SK_R32_SHIFT == 0)
+ return PP_IMAGEDATAFORMAT_RGRA_PREMUL;
+ else
+ return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
dmichael (off chromium) 2013/09/24 19:13:03 originally, there was a comment at the end of this
Joshuar 2013/09/24 19:18:38 Done.
#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698