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

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

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return new CanvasStyle(pattern); 109 return new CanvasStyle(pattern);
110 } 110 }
111 111
112 void CanvasStyle::applyToPaint(SkPaint& paint) const 112 void CanvasStyle::applyToPaint(SkPaint& paint) const
113 { 113 {
114 switch (m_type) { 114 switch (m_type) {
115 case ColorRGBA: 115 case ColorRGBA:
116 paint.setShader(nullptr); 116 paint.setShader(nullptr);
117 break; 117 break;
118 case Gradient: 118 case Gradient:
119 canvasGradient()->gradient()->applyToPaint(paint); 119 getCanvasGradient()->getGradient()->applyToPaint(paint);
120 break; 120 break;
121 case ImagePattern: 121 case ImagePattern:
122 canvasPattern()->pattern()->applyToPaint(paint); 122 getCanvasPattern()->getPattern()->applyToPaint(paint);
123 break; 123 break;
124 default: 124 default:
125 ASSERT_NOT_REACHED(); 125 ASSERT_NOT_REACHED();
126 } 126 }
127 } 127 }
128 128
129 RGBA32 CanvasStyle::paintColor() const 129 RGBA32 CanvasStyle::paintColor() const
130 { 130 {
131 if (m_type == ColorRGBA) 131 if (m_type == ColorRGBA)
132 return m_rgba; 132 return m_rgba;
133 ASSERT(m_type == Gradient || m_type == ImagePattern); 133 ASSERT(m_type == Gradient || m_type == ImagePattern);
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