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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ColorSpace.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2008, Google Inc. All rights reserved.
3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 14 matching lines...) Expand all
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33 #include "platform/graphics/ColorSpace.h" 33 #include "platform/graphics/ColorSpace.h"
34 34
35 #include <algorithm>
35 #include "platform/graphics/skia/SkiaUtils.h" 36 #include "platform/graphics/skia/SkiaUtils.h"
36 #include "public/platform/WebScreenInfo.h" 37 #include "public/platform/WebScreenInfo.h"
37 #include "third_party/skia/include/core/SkColorSpaceXform.h" 38 #include "third_party/skia/include/core/SkColorSpaceXform.h"
38 #include "third_party/skia/include/effects/SkTableColorFilter.h" 39 #include "third_party/skia/include/effects/SkTableColorFilter.h"
39 #include "wtf/MathExtras.h" 40 #include "wtf/MathExtras.h"
40 #include <algorithm>
41 41
42 namespace blink { 42 namespace blink {
43 43
44 namespace ColorSpaceUtilities { 44 namespace ColorSpaceUtilities {
45 45
46 static const uint8_t* getLinearRgbLUT() { 46 static const uint8_t* getLinearRgbLUT() {
47 static uint8_t linearRgbLUT[256]; 47 static uint8_t linearRgbLUT[256];
48 static bool initialized; 48 static bool initialized;
49 if (!initialized) { 49 if (!initialized) {
50 for (unsigned i = 0; i < 256; i++) { 50 for (unsigned i = 0; i < 256; i++) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 if (score < 2.2) 166 if (score < 2.2)
167 return ColorSpaceGamut::BT2020; // actual score 2.104520 167 return ColorSpaceGamut::BT2020; // actual score 2.104520
168 if (score < 2.7) 168 if (score < 2.7)
169 return ColorSpaceGamut::ProPhoto; // actual score 2.913247 169 return ColorSpaceGamut::ProPhoto; // actual score 2.913247
170 return ColorSpaceGamut::UltraWide; 170 return ColorSpaceGamut::UltraWide;
171 } 171 }
172 172
173 } // namespace ColorSpaceUtilities 173 } // namespace ColorSpaceUtilities
174 174
175 } // namespace blink 175 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698