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

Side by Side Diff: core/include/fxcrt/fx_system.h

Issue 1692413002: One less PI, one less Bezier. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: One less bezier, too. Created 4 years, 10 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 | fpdfsdk/include/pdfwindow/PWL_Utils.h » ('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 #ifndef CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ 7 #ifndef CORE_INCLUDE_FXCRT_FX_SYSTEM_H_
8 #define CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ 8 #define CORE_INCLUDE_FXCRT_FX_SYSTEM_H_
9 9
10 #include <assert.h> 10 #include <assert.h>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 #define FXSYS_assert assert 104 #define FXSYS_assert assert
105 #ifndef ASSERT 105 #ifndef ASSERT
106 #ifdef _DEBUG 106 #ifdef _DEBUG
107 #define ASSERT FXSYS_assert 107 #define ASSERT FXSYS_assert
108 #else 108 #else
109 #define ASSERT(a) 109 #define ASSERT(a)
110 #endif 110 #endif
111 #endif 111 #endif
112 112
113 #define FX_MIN(a, b) (((a) < (b)) ? (a) : (b)) 113 #define FX_MIN(a, b) (((a) < (b)) ? (a) : (b))
114
115 // M_PI not universally present on all platforms.
114 #define FX_PI 3.1415926535897932384626433832795f 116 #define FX_PI 3.1415926535897932384626433832795f
117 #define FX_BEZIER 0.5522847498308f
115 118
116 // NOTE: prevent use of the return value from snprintf() since some platforms 119 // NOTE: prevent use of the return value from snprintf() since some platforms
117 // have different return values (e.g. windows _vsnprintf()), and provide 120 // have different return values (e.g. windows _vsnprintf()), and provide
118 // versions that always NUL-terminate. 121 // versions that always NUL-terminate.
119 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900 122 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900
120 void FXSYS_snprintf(char* str, 123 void FXSYS_snprintf(char* str,
121 size_t size, 124 size_t size,
122 _Printf_format_string_ const char* fmt, 125 _Printf_format_string_ const char* fmt,
123 ...); 126 ...);
124 void FXSYS_vsnprintf(char* str, size_t size, const char* fmt, va_list ap); 127 void FXSYS_vsnprintf(char* str, size_t size, const char* fmt, va_list ap);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 314
312 // Prevent a function from ever being inlined, typically because we'd 315 // Prevent a function from ever being inlined, typically because we'd
313 // like it to appear in stack traces. 316 // like it to appear in stack traces.
314 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 317 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
315 #define NEVER_INLINE __declspec(noinline) 318 #define NEVER_INLINE __declspec(noinline)
316 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 319 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
317 #define NEVER_INLINE __attribute__((__noinline__)) 320 #define NEVER_INLINE __attribute__((__noinline__))
318 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 321 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
319 322
320 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ 323 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/include/pdfwindow/PWL_Utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698