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

Side by Side Diff: core/include/fxge/fx_dib.h

Issue 578253002: Add missing parenthesis in FXARGB_GETDIB macro (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef _FPDF_DIB_H_ 7 #ifndef _FPDF_DIB_H_
8 #define _FPDF_DIB_H_ 8 #define _FPDF_DIB_H_
9 #ifndef _FXCRT_EXTENSION_ 9 #ifndef _FXCRT_EXTENSION_
10 #include "../fxcrt/fx_ext.h" 10 #include "../fxcrt/fx_ext.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #define FXARGB_MUL_ALPHA(argb, alpha) (((((argb) >> 24) * (alpha) / 255) << 24) | ((argb) & 0xffffff)) 98 #define FXARGB_MUL_ALPHA(argb, alpha) (((((argb) >> 24) * (alpha) / 255) << 24) | ((argb) & 0xffffff))
99 #define FXRGB2GRAY(r,g,b) (((b) * 11 + (g) * 59 + (r) * 30) / 100) 99 #define FXRGB2GRAY(r,g,b) (((b) * 11 + (g) * 59 + (r) * 30) / 100)
100 #define FXCMYK2GRAY(c,m,y,k) (((255-(c)) * (255-(k)) * 30 + (255-(m)) * (255-(k) ) * 59 + (255-(y)) * (255-(k)) * 11) / 25500) 100 #define FXCMYK2GRAY(c,m,y,k) (((255-(c)) * (255-(k)) * 30 + (255-(m)) * (255-(k) ) * 59 + (255-(y)) * (255-(k)) * 11) / 25500)
101 #define FXDIB_ALPHA_MERGE(backdrop, source, source_alpha) (((backdrop) * (255-(s ource_alpha)) + (source)*(source_alpha))/255) 101 #define FXDIB_ALPHA_MERGE(backdrop, source, source_alpha) (((backdrop) * (255-(s ource_alpha)) + (source)*(source_alpha))/255)
102 #define FXDIB_ALPHA_UNION(dest, src) ((dest) + (src) - (dest)*(src)/255) 102 #define FXDIB_ALPHA_UNION(dest, src) ((dest) + (src) - (dest)*(src)/255)
103 #define FXCMYK_GETDIB(p) ((((FX_LPBYTE)(p))[0] << 24 | (((FX_LPBYTE)(p))[1] << 1 6) | (((FX_LPBYTE)(p))[2] << 8) | ((FX_LPBYTE)(p))[3])) 103 #define FXCMYK_GETDIB(p) ((((FX_LPBYTE)(p))[0] << 24 | (((FX_LPBYTE)(p))[1] << 1 6) | (((FX_LPBYTE)(p))[2] << 8) | ((FX_LPBYTE)(p))[3]))
104 #define FXCMYK_SETDIB(p, cmyk) ((FX_LPBYTE)(p))[0] = (FX_BYTE)((cmyk) >> 24), \ 104 #define FXCMYK_SETDIB(p, cmyk) ((FX_LPBYTE)(p))[0] = (FX_BYTE)((cmyk) >> 24), \
105 ((FX_LPBYTE)(p))[1] = (FX_BYTE)((cmyk) >> 16), \ 105 ((FX_LPBYTE)(p))[1] = (FX_BYTE)((cmyk) >> 16), \
106 ((FX_LPBYTE)(p))[2] = (FX_BYTE)((cmyk) >> 8), \ 106 ((FX_LPBYTE)(p))[2] = (FX_BYTE)((cmyk) >> 8), \
107 ((FX_LPBYTE)(p))[3] = (FX_BYTE)(cmyk)) 107 ((FX_LPBYTE)(p))[3] = (FX_BYTE)(cmyk))
108 #define FXARGB_GETDIB(p) (((FX_LPBYTE)(p))[0]) | (((FX_LPBYTE)(p))[1] << 8) | (( (FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[3] << 24) 108 #define FXARGB_GETDIB(p) ((((FX_LPBYTE)(p))[0]) | (((FX_LPBYTE)(p))[1] << 8) | ( ((FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[3] << 24))
109 #define FXARGB_SETDIB(p, argb) ((FX_LPBYTE)(p))[0] = (FX_BYTE)(argb), \ 109 #define FXARGB_SETDIB(p, argb) ((FX_LPBYTE)(p))[0] = (FX_BYTE)(argb), \
110 ((FX_LPBYTE)(p))[1] = (FX_BYTE)((argb) >> 8), \ 110 ((FX_LPBYTE)(p))[1] = (FX_BYTE)((argb) >> 8), \
111 ((FX_LPBYTE)(p))[2] = (FX_BYTE)((argb) >> 16), \ 111 ((FX_LPBYTE)(p))[2] = (FX_BYTE)((argb) >> 16), \
112 ((FX_LPBYTE)(p))[3] = (FX_BYTE)((argb) >> 24) 112 ((FX_LPBYTE)(p))[3] = (FX_BYTE)((argb) >> 24)
113 #define FXARGB_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \ 113 #define FXARGB_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \
114 *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \ 114 *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \
115 *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \ 115 *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \
116 *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)( src)+3) 116 *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)( src)+3)
117 #define FXCMYK_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \ 117 #define FXCMYK_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \
118 *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \ 118 *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 int m_Status; 597 int m_Status;
598 int m_DestLeft, m_DestTop; 598 int m_DestLeft, m_DestTop;
599 FX_RECT m_ClipBox; 599 FX_RECT m_ClipBox;
600 FX_DWORD m_Flags; 600 FX_DWORD m_Flags;
601 int m_AlphaFlag; 601 int m_AlphaFlag;
602 void* m_pIccTransform; 602 void* m_pIccTransform;
603 FX_BOOL m_bRgbByteOrder; 603 FX_BOOL m_bRgbByteOrder;
604 int m_BlendType; 604 int m_BlendType;
605 }; 605 };
606 #endif 606 #endif
OLDNEW
« 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