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

Unified Diff: third_party/libwebp/webp/encode.h

Issue 10496016: Add RGBX BGRX support to WEBPImportPicture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment nits. Created 8 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 | « third_party/libwebp/enc/picture.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libwebp/webp/encode.h
diff --git a/third_party/libwebp/webp/encode.h b/third_party/libwebp/webp/encode.h
index 31f0539750faa6dc935348bef4cee239ef55c9be..ae9841910535edbaec89a003c13249375f21a1da 100644
--- a/third_party/libwebp/webp/encode.h
+++ b/third_party/libwebp/webp/encode.h
@@ -249,15 +249,22 @@ WEBP_EXTERN(int) WebPPictureRescale(WebPPicture* const pic,
// Returns 0 in case of memory error.
WEBP_EXTERN(int) WebPPictureImportRGB(
WebPPicture* const picture, const uint8_t* const rgb, int rgb_stride);
-// Same, but for RGBA buffer
+// Same, but for RGBA buffer.
WEBP_EXTERN(int) WebPPictureImportRGBA(
WebPPicture* const picture, const uint8_t* const rgba, int rgba_stride);
+// Same, but for RGBA buffer. Imports the RGB direct from the 32-bit format
+// input buffer ignoring the alpha channel. Avoids needing to copy the data
+// to a temporary 24-bit RGB buffer to import the RGB only.
+WEBP_EXTERN(int) WebPPictureImportRGBX(
+ WebPPicture* const picture, const uint8_t* const rgbx, int rgbx_stride);
-// Variant of the above, but taking BGR(A) input:
+// Variants of the above, but taking BGR(A|X) input.
WEBP_EXTERN(int) WebPPictureImportBGR(
WebPPicture* const picture, const uint8_t* const bgr, int bgr_stride);
WEBP_EXTERN(int) WebPPictureImportBGRA(
WebPPicture* const picture, const uint8_t* const bgra, int bgra_stride);
+WEBP_EXTERN(int) WebPPictureImportBGRX(
+ WebPPicture* const picture, const uint8_t* const bgrx, int bgrx_stride);
//------------------------------------------------------------------------------
// Main call
« no previous file with comments | « third_party/libwebp/enc/picture.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698