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

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

Issue 1862733002: Remove all use of crop edges from SkImageFilter::CropRect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update to ToT 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 m_fillStyle->applyToPaint(fillPaintForFilter); 314 m_fillStyle->applyToPaint(fillPaintForFilter);
315 m_strokeStyle->applyToPaint(strokePaintForFilter); 315 m_strokeStyle->applyToPaint(strokePaintForFilter);
316 fillPaintForFilter.setColor(m_fillStyle->paintColor()); 316 fillPaintForFilter.setColor(m_fillStyle->paintColor());
317 strokePaintForFilter.setColor(m_strokeStyle->paintColor()); 317 strokePaintForFilter.setColor(m_strokeStyle->paintColor());
318 FloatSize floatCanvasSize(canvasSize); 318 FloatSize floatCanvasSize(canvasSize);
319 const double effectiveZoom = 1.0; // Deliberately ignore zoom on the can vas element 319 const double effectiveZoom = 1.0; // Deliberately ignore zoom on the can vas element
320 filterEffectBuilder->build(styleResolutionHost, filterStyle->filter(), e ffectiveZoom, &floatCanvasSize, &fillPaintForFilter, &strokePaintForFilter); 320 filterEffectBuilder->build(styleResolutionHost, filterStyle->filter(), e ffectiveZoom, &floatCanvasSize, &fillPaintForFilter, &strokePaintForFilter);
321 321
322 SkiaImageFilterBuilder imageFilterBuilder; 322 SkiaImageFilterBuilder imageFilterBuilder;
323 FilterEffect* lastEffect = filterEffectBuilder->lastEffect(); 323 FilterEffect* lastEffect = filterEffectBuilder->lastEffect();
324 if (lastEffect) {
325 lastEffect->determineFilterPrimitiveSubregion();
326 }
324 m_resolvedFilter = imageFilterBuilder.build(lastEffect, ColorSpaceDevice RGB); 327 m_resolvedFilter = imageFilterBuilder.build(lastEffect, ColorSpaceDevice RGB);
325 if (m_resolvedFilter) { 328 if (m_resolvedFilter) {
326 updateFilterReferences(toHTMLCanvasElement(styleResolutionHost), con text, filterStyle->filter()); 329 updateFilterReferences(toHTMLCanvasElement(styleResolutionHost), con text, filterStyle->filter());
327 if (lastEffect->originTainted()) 330 if (lastEffect->originTainted())
328 context->setOriginTainted(); 331 context->setOriginTainted();
329 } 332 }
330 } 333 }
331 334
332 return m_resolvedFilter.get(); 335 return m_resolvedFilter.get();
333 } 336 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 paint->setLooper(0); 560 paint->setLooper(0);
558 paint->setImageFilter(shadowAndForegroundImageFilter()); 561 paint->setImageFilter(shadowAndForegroundImageFilter());
559 return paint; 562 return paint;
560 } 563 }
561 paint->setLooper(sk_ref_sp(shadowAndForegroundDrawLooper())); 564 paint->setLooper(sk_ref_sp(shadowAndForegroundDrawLooper()));
562 paint->setImageFilter(0); 565 paint->setImageFilter(0);
563 return paint; 566 return paint;
564 } 567 }
565 568
566 } // namespace blink 569 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698