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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp

Issue 1775153002: Make OffscreenCanvasRenderingContext2D renderable on a worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 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 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 bool parseColorOrCurrentColor(Color& parsedColor, const String& colorString, HTM LCanvasElement* canvas) 64 bool parseColorOrCurrentColor(Color& parsedColor, const String& colorString, HTM LCanvasElement* canvas)
65 { 65 {
66 ColorParseResult parseResult = parseColor(parsedColor, colorString); 66 ColorParseResult parseResult = parseColor(parsedColor, colorString);
67 switch (parseResult) { 67 switch (parseResult) {
68 case ParsedRGBA: 68 case ParsedRGBA:
69 case ParsedSystemColor: 69 case ParsedSystemColor:
70 return true; 70 return true;
71 case ParsedCurrentColor: 71 case ParsedCurrentColor:
72 parsedColor = currentColor(canvas); 72 parsedColor = canvas ? currentColor(canvas) : Color::black;
73 return true; 73 return true;
74 case ParseFailed: 74 case ParseFailed:
75 return false; 75 return false;
76 default: 76 default:
77 ASSERT_NOT_REACHED(); 77 ASSERT_NOT_REACHED();
78 return false; 78 return false;
79 } 79 }
80 } 80 }
81 81
82 CanvasStyle::CanvasStyle(RGBA32 rgba) 82 CanvasStyle::CanvasStyle(RGBA32 rgba)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return Color::black; 134 return Color::black;
135 } 135 }
136 136
137 DEFINE_TRACE(CanvasStyle) 137 DEFINE_TRACE(CanvasStyle)
138 { 138 {
139 visitor->trace(m_gradient); 139 visitor->trace(m_gradient);
140 visitor->trace(m_pattern); 140 visitor->trace(m_pattern);
141 } 141 }
142 142
143 } // namespace blink 143 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698