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

Side by Side Diff: core/fxge/ge/fx_ge_text.cpp

Issue 1951653002: Return bool rather than bitwise-and for FX_BOOL (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More bool, fix nits. Created 4 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 unified diff | Download patch
« no previous file with comments | « core/fxcrt/extension.h ('k') | xfa/fwl/basewidget/fwl_comboboximp.cpp » ('j') | 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 #include <limits> 7 #include <limits>
8 8
9 #include "core/fxcodec/include/fx_codec.h" 9 #include "core/fxcodec/include/fx_codec.h"
10 #include "core/fxge/ge/fx_text_int.h" 10 #include "core/fxge/ge/fx_text_int.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 int nrows = pGlyph->GetHeight(); 406 int nrows = pGlyph->GetHeight();
407 if (anti_alias == FXFT_RENDER_MODE_NORMAL) { 407 if (anti_alias == FXFT_RENDER_MODE_NORMAL) {
408 if (!bitmap.CompositeMask(left, top, ncols, nrows, pGlyph, fill_color, 0, 408 if (!bitmap.CompositeMask(left, top, ncols, nrows, pGlyph, fill_color, 0,
409 0, FXDIB_BLEND_NORMAL, NULL, FALSE, alpha_flag, 409 0, FXDIB_BLEND_NORMAL, NULL, FALSE, alpha_flag,
410 pIccTransform)) { 410 pIccTransform)) {
411 FX_Free(pGlyphAndPos); 411 FX_Free(pGlyphAndPos);
412 return FALSE; 412 return FALSE;
413 } 413 }
414 continue; 414 continue;
415 } 415 }
416 FX_BOOL bBGRStripe = text_flags & FXTEXT_BGR_STRIPE; 416 bool bBGRStripe = !!(text_flags & FXTEXT_BGR_STRIPE);
417 ncols /= 3; 417 ncols /= 3;
418 int x_subpixel = (int)(glyph.m_fOriginX * 3) % 3; 418 int x_subpixel = (int)(glyph.m_fOriginX * 3) % 3;
419 uint8_t* src_buf = pGlyph->GetBuffer(); 419 uint8_t* src_buf = pGlyph->GetBuffer();
420 int src_pitch = pGlyph->GetPitch(); 420 int src_pitch = pGlyph->GetPitch();
421 int start_col = left; 421 int start_col = left;
422 if (start_col < 0) { 422 if (start_col < 0) {
423 start_col = 0; 423 start_col = 0;
424 } 424 }
425 int end_col = left + ncols; 425 int end_col = left + ncols;
426 if (end_col > dest_width) { 426 if (end_col > dest_width) {
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 void _CFX_UniqueKeyGen::Generate(int count, ...) { 1907 void _CFX_UniqueKeyGen::Generate(int count, ...) {
1908 va_list argList; 1908 va_list argList;
1909 va_start(argList, count); 1909 va_start(argList, count);
1910 for (int i = 0; i < count; i++) { 1910 for (int i = 0; i < count; i++) {
1911 int p = va_arg(argList, int); 1911 int p = va_arg(argList, int);
1912 ((uint32_t*)m_Key)[i] = p; 1912 ((uint32_t*)m_Key)[i] = p;
1913 } 1913 }
1914 va_end(argList); 1914 va_end(argList);
1915 m_KeyLen = count * sizeof(uint32_t); 1915 m_KeyLen = count * sizeof(uint32_t);
1916 } 1916 }
OLDNEW
« no previous file with comments | « core/fxcrt/extension.h ('k') | xfa/fwl/basewidget/fwl_comboboximp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698