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

Unified Diff: core/fpdfapi/page/fpdf_page_colors.cpp

Issue 2486123002: Relax colorspace checks in CPDF_DIBSource::CreateDecoder(). (Closed)
Patch Set: address simple nits Created 4 years, 1 month 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 | core/fpdfapi/render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/page/fpdf_page_colors.cpp
diff --git a/core/fpdfapi/page/fpdf_page_colors.cpp b/core/fpdfapi/page/fpdf_page_colors.cpp
index 455233abb57abc237c577ed18e8d7b492b654c87..69129e4f2b121d03a1547acc2905b11fd2f1cff4 100644
--- a/core/fpdfapi/page/fpdf_page_colors.cpp
+++ b/core/fpdfapi/page/fpdf_page_colors.cpp
@@ -21,6 +21,12 @@
namespace {
+FX_FLOAT NormalizeChannel(FX_FLOAT fVal) {
+ return std::min(std::max(fVal, 0.0f), 1.0f);
+}
+
+} // namespace
+
uint32_t ComponentsForFamily(int family) {
if (family == PDFCS_DEVICERGB)
return 3;
@@ -30,12 +36,6 @@ uint32_t ComponentsForFamily(int family) {
return 4;
}
-FX_FLOAT NormalizeChannel(FX_FLOAT fVal) {
- return std::min(std::max(fVal, 0.0f), 1.0f);
-}
-
-} // namespace
-
void sRGB_to_AdobeCMYK(FX_FLOAT R,
FX_FLOAT G,
FX_FLOAT B,
« no previous file with comments | « no previous file | core/fpdfapi/render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698