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

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

Issue 2307343002: Remove dead uses of FilterEffect::determineMaximumEffectRect (Closed)
Patch Set: Created 4 years, 3 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 SkPaint strokePaintForFilter; 316 SkPaint strokePaintForFilter;
317 m_fillStyle->applyToPaint(fillPaintForFilter); 317 m_fillStyle->applyToPaint(fillPaintForFilter);
318 m_strokeStyle->applyToPaint(strokePaintForFilter); 318 m_strokeStyle->applyToPaint(strokePaintForFilter);
319 fillPaintForFilter.setColor(m_fillStyle->paintColor()); 319 fillPaintForFilter.setColor(m_fillStyle->paintColor());
320 strokePaintForFilter.setColor(m_strokeStyle->paintColor()); 320 strokePaintForFilter.setColor(m_strokeStyle->paintColor());
321 FloatSize floatCanvasSize(canvasSize); 321 FloatSize floatCanvasSize(canvasSize);
322 const double effectiveZoom = 1.0; // Deliberately ignore zoom on the can vas element 322 const double effectiveZoom = 1.0; // Deliberately ignore zoom on the can vas element
323 filterEffectBuilder->build(styleResolutionHost, filterStyle->filter(), e ffectiveZoom, &floatCanvasSize, &fillPaintForFilter, &strokePaintForFilter); 323 filterEffectBuilder->build(styleResolutionHost, filterStyle->filter(), e ffectiveZoom, &floatCanvasSize, &fillPaintForFilter, &strokePaintForFilter);
324 324
325 if (FilterEffect* lastEffect = filterEffectBuilder->lastEffect()) { 325 if (FilterEffect* lastEffect = filterEffectBuilder->lastEffect()) {
326 lastEffect->determineMaximumEffectRect(DetermineMaxEffectRectNone);
327 m_resolvedFilter = SkiaImageFilterBuilder::build(lastEffect, ColorSp aceDeviceRGB); 326 m_resolvedFilter = SkiaImageFilterBuilder::build(lastEffect, ColorSp aceDeviceRGB);
328 if (m_resolvedFilter) { 327 if (m_resolvedFilter) {
329 updateFilterReferences(toHTMLCanvasElement(styleResolutionHost), context, filterStyle->filter()); 328 updateFilterReferences(toHTMLCanvasElement(styleResolutionHost), context, filterStyle->filter());
330 if (lastEffect->originTainted()) 329 if (lastEffect->originTainted())
331 context->setOriginTainted(); 330 context->setOriginTainted();
332 } 331 }
333 } 332 }
334 } 333 }
335 334
336 return m_resolvedFilter.get(); 335 return m_resolvedFilter.get();
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 paint->setLooper(0); 560 paint->setLooper(0);
562 paint->setImageFilter(shadowAndForegroundImageFilter()); 561 paint->setImageFilter(shadowAndForegroundImageFilter());
563 return paint; 562 return paint;
564 } 563 }
565 paint->setLooper(sk_ref_sp(shadowAndForegroundDrawLooper())); 564 paint->setLooper(sk_ref_sp(shadowAndForegroundDrawLooper()));
566 paint->setImageFilter(0); 565 paint->setImageFilter(0);
567 return paint; 566 return paint;
568 } 567 }
569 568
570 } // namespace blink 569 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698