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

Side by Side Diff: Source/platform/graphics/Color.h

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef Color_h 26 #ifndef Color_h
27 #define Color_h 27 #define Color_h
28 28
29 #include "platform/animation/AnimationUtilities.h" 29 #include "platform/animation/AnimationUtilities.h"
30 #include "wtf/FastAllocBase.h" 30 #include "wtf/FastAllocBase.h"
31 #include "wtf/Forward.h" 31 #include "wtf/Forward.h"
32 #include "wtf/unicode/Unicode.h" 32 #include "wtf/unicode/Unicode.h"
33 33
34 namespace WebCore { 34 namespace blink {
35 35
36 class Color; 36 class Color;
37 37
38 typedef unsigned RGBA32; // RGBA quadruplet 38 typedef unsigned RGBA32; // RGBA quadruplet
39 39
40 PLATFORM_EXPORT RGBA32 makeRGB(int r, int g, int b); 40 PLATFORM_EXPORT RGBA32 makeRGB(int r, int g, int b);
41 PLATFORM_EXPORT RGBA32 makeRGBA(int r, int g, int b, int a); 41 PLATFORM_EXPORT RGBA32 makeRGBA(int r, int g, int b, int a);
42 42
43 PLATFORM_EXPORT RGBA32 colorWithOverrideAlpha(RGBA32 color, float overrideAlpha) ; 43 PLATFORM_EXPORT RGBA32 colorWithOverrideAlpha(RGBA32 color, float overrideAlpha) ;
44 PLATFORM_EXPORT RGBA32 makeRGBA32FromFloats(float r, float g, float b, float a); 44 PLATFORM_EXPORT RGBA32 makeRGBA32FromFloats(float r, float g, float b, float a);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 blend(premultFrom.alpha(), premultTo.alpha(), progr ess)); 164 blend(premultFrom.alpha(), premultTo.alpha(), progr ess));
165 165
166 return Color(colorFromPremultipliedARGB(premultBlended.rgb())); 166 return Color(colorFromPremultipliedARGB(premultBlended.rgb()));
167 } 167 }
168 168
169 return Color(blend(from.red(), to.red(), progress), 169 return Color(blend(from.red(), to.red(), progress),
170 blend(from.green(), to.green(), progress), 170 blend(from.green(), to.green(), progress),
171 blend(from.blue(), to.blue(), progress), 171 blend(from.blue(), to.blue(), progress),
172 blend(from.alpha(), to.alpha(), progress)); 172 blend(from.alpha(), to.alpha(), progress));
173 } 173 }
174 } // namespace WebCore 174 } // namespace blink
175 175
176 #endif // Color_h 176 #endif // Color_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/Canvas2DLayerManagerTest.cpp ('k') | Source/platform/graphics/Color.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698