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

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

Issue 1828163002: Remove ASSERT_ARG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "modules/canvas2d/CanvasRenderingContext2DState.h" 5 #include "modules/canvas2d/CanvasRenderingContext2DState.h"
6 6
7 #include "core/css/CSSFontSelector.h" 7 #include "core/css/CSSFontSelector.h"
8 #include "core/css/resolver/FilterOperationResolver.h" 8 #include "core/css/resolver/FilterOperationResolver.h"
9 #include "core/css/resolver/StyleBuilder.h" 9 #include "core/css/resolver/StyleBuilder.h"
10 #include "core/css/resolver/StyleResolverState.h" 10 #include "core/css/resolver/StyleResolverState.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 CanvasRenderingContext2DState::~CanvasRenderingContext2DState() 113 CanvasRenderingContext2DState::~CanvasRenderingContext2DState()
114 { 114 {
115 #if !ENABLE(OILPAN) 115 #if !ENABLE(OILPAN)
116 if (m_realizedFont) 116 if (m_realizedFont)
117 static_cast<CSSFontSelector*>(m_font.getFontSelector())->unregisterForIn validationCallbacks(this); 117 static_cast<CSSFontSelector*>(m_font.getFontSelector())->unregisterForIn validationCallbacks(this);
118 #endif 118 #endif
119 } 119 }
120 120
121 void CanvasRenderingContext2DState::fontsNeedUpdate(CSSFontSelector* fontSelecto r) 121 void CanvasRenderingContext2DState::fontsNeedUpdate(CSSFontSelector* fontSelecto r)
122 { 122 {
123 ASSERT_ARG(fontSelector, fontSelector == m_font.getFontSelector()); 123 DCHECK_EQ(fontSelector, m_font.getFontSelector());
124 ASSERT(m_realizedFont); 124 ASSERT(m_realizedFont);
125 125
126 m_font.update(fontSelector); 126 m_font.update(fontSelector);
127 // FIXME: We only really need to invalidate the resolved filter if the font 127 // FIXME: We only really need to invalidate the resolved filter if the font
128 // update above changed anything and the filter uses font-dependent units. 128 // update above changed anything and the filter uses font-dependent units.
129 m_resolvedFilter.clear(); 129 m_resolvedFilter.clear();
130 } 130 }
131 131
132 DEFINE_TRACE(CanvasRenderingContext2DState) 132 DEFINE_TRACE(CanvasRenderingContext2DState)
133 { 133 {
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 paint->setLooper(0); 565 paint->setLooper(0);
566 paint->setImageFilter(shadowAndForegroundImageFilter()); 566 paint->setImageFilter(shadowAndForegroundImageFilter());
567 return paint; 567 return paint;
568 } 568 }
569 paint->setLooper(shadowAndForegroundDrawLooper()); 569 paint->setLooper(shadowAndForegroundDrawLooper());
570 paint->setImageFilter(0); 570 paint->setImageFilter(0);
571 return paint; 571 return paint;
572 } 572 }
573 573
574 } // namespace blink 574 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698