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

Side by Side Diff: Source/platform/graphics/GraphicsContextState.cpp

Issue 177473003: Use SkLayerDrawLooper::Builder to construct SkLayerDrawLooper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 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
« no previous file with comments | « Source/platform/graphics/GraphicsContextState.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "platform/graphics/GraphicsContextState.h" 6 #include "platform/graphics/GraphicsContextState.h"
7 7
8 namespace WebCore { 8 namespace WebCore {
9 9
10 GraphicsContextState::GraphicsContextState() 10 GraphicsContextState::GraphicsContextState()
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 void GraphicsContextState::clearFillPattern() 183 void GraphicsContextState::clearFillPattern()
184 { 184 {
185 m_fillPattern.clear(); 185 m_fillPattern.clear();
186 ASSERT(!m_fillGradient); 186 ASSERT(!m_fillGradient);
187 m_fillPaint.setColor(applyAlpha(m_fillColor.rgb())); 187 m_fillPaint.setColor(applyAlpha(m_fillColor.rgb()));
188 } 188 }
189 189
190 // Shadow. (This will need tweaking if we use draw loopers for other things.) 190 // Shadow. (This will need tweaking if we use draw loopers for other things.)
191 void GraphicsContextState::setDrawLooper(const DrawLooper& drawLooper) 191 void GraphicsContextState::setDrawLooper(PassRefPtr<SkDrawLooper> drawLooper)
192 { 192 {
193 m_looper = drawLooper.skDrawLooper(); 193 m_looper = drawLooper;
194 m_strokePaint.setLooper(m_looper.get()); 194 m_strokePaint.setLooper(m_looper.get());
195 m_fillPaint.setLooper(m_looper.get()); 195 m_fillPaint.setLooper(m_looper.get());
196 } 196 }
197 197
198 void GraphicsContextState::clearDrawLooper() 198 void GraphicsContextState::clearDrawLooper()
199 { 199 {
200 m_looper.clear(); 200 m_looper.clear();
201 m_strokePaint.setLooper(0); 201 m_strokePaint.setLooper(0);
202 m_fillPaint.setLooper(0); 202 m_fillPaint.setLooper(0);
203 } 203 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 void GraphicsContextState::setShouldAntialias(bool shouldAntialias) 246 void GraphicsContextState::setShouldAntialias(bool shouldAntialias)
247 { 247 {
248 m_shouldAntialias = shouldAntialias; 248 m_shouldAntialias = shouldAntialias;
249 m_strokePaint.setAntiAlias(shouldAntialias); 249 m_strokePaint.setAntiAlias(shouldAntialias);
250 m_fillPaint.setAntiAlias(shouldAntialias); 250 m_fillPaint.setAntiAlias(shouldAntialias);
251 } 251 }
252 252
253 253
254 } // namespace WebCore 254 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsContextState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698