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

Side by Side Diff: third_party/WebKit/WebCore/html/CanvasRenderingContext2D.cpp

Issue 21165: Revert the merge. Mac build is mysteriously broken. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 860
861 void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float c, float m, float y, float k, float a) 861 void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float c, float m, float y, float k, float a)
862 { 862 {
863 state().m_shadowOffset = FloatSize(width, height); 863 state().m_shadowOffset = FloatSize(width, height);
864 state().m_shadowBlur = blur; 864 state().m_shadowBlur = blur;
865 state().m_shadowColor = ""; 865 state().m_shadowColor = "";
866 866
867 GraphicsContext* dc = drawingContext(); 867 GraphicsContext* dc = drawingContext();
868 if (!dc) 868 if (!dc)
869 return; 869 return;
870 // FIXME: Do this through platform-independent GraphicsContext API.
870 #if PLATFORM(CG) 871 #if PLATFORM(CG)
871 const CGFloat components[5] = { c, m, y, k, a }; 872 const CGFloat components[5] = { c, m, y, k, a };
872 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceCMYK(); 873 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceCMYK();
873 CGColorRef shadowColor = CGColorCreate(colorSpace, components); 874 CGColorRef shadowColor = CGColorCreate(colorSpace, components);
874 CGColorSpaceRelease(colorSpace); 875 CGColorSpaceRelease(colorSpace);
875 CGContextSetShadowWithColor(dc->platformContext(), adjustedShadowSize(width, -height), blur, shadowColor); 876 CGContextSetShadowWithColor(dc->platformContext(), adjustedShadowSize(width, -height), blur, shadowColor);
876 CGColorRelease(shadowColor); 877 CGColorRelease(shadowColor);
877 #else
878 dc->setShadow(IntSize(width, -height), blur, Color(c, m, y, k, a));
879 #endif 878 #endif
880 } 879 }
881 880
882 void CanvasRenderingContext2D::clearShadow() 881 void CanvasRenderingContext2D::clearShadow()
883 { 882 {
884 state().m_shadowOffset = FloatSize(); 883 state().m_shadowOffset = FloatSize();
885 state().m_shadowBlur = 0; 884 state().m_shadowBlur = 0;
886 state().m_shadowColor = ""; 885 state().m_shadowColor = "";
887 applyShadow(); 886 applyShadow();
888 } 887 }
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 } 1451 }
1453 1452
1454 const Font& CanvasRenderingContext2D::accessFont() 1453 const Font& CanvasRenderingContext2D::accessFont()
1455 { 1454 {
1456 if (!state().m_realizedFont) 1455 if (!state().m_realizedFont)
1457 setFont(state().m_unparsedFont); 1456 setFont(state().m_unparsedFont);
1458 return state().m_font; 1457 return state().m_font;
1459 } 1458 }
1460 1459
1461 } // namespace WebCore 1460 } // namespace WebCore
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/history/HistoryItem.cpp ('k') | third_party/WebKit/WebCore/html/CanvasStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698