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

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

Issue 1013803002: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 ASSERT(m_canvas); 542 ASSERT(m_canvas);
543 543
544 SkPaint picturePaint; 544 SkPaint picturePaint;
545 picturePaint.setXfermodeMode(op); 545 picturePaint.setXfermodeMode(op);
546 m_canvas->save(); 546 m_canvas->save();
547 SkRect sourceBounds = WebCoreFloatRectToSKRect(src); 547 SkRect sourceBounds = WebCoreFloatRectToSKRect(src);
548 SkRect skBounds = WebCoreFloatRectToSKRect(dest); 548 SkRect skBounds = WebCoreFloatRectToSKRect(dest);
549 SkMatrix pictureTransform; 549 SkMatrix pictureTransform;
550 pictureTransform.setRectToRect(sourceBounds, skBounds, SkMatrix::kFill_Scale ToFit); 550 pictureTransform.setRectToRect(sourceBounds, skBounds, SkMatrix::kFill_Scale ToFit);
551 m_canvas->concat(pictureTransform); 551 m_canvas->concat(pictureTransform);
552 RefPtr<SkPictureImageFilter> pictureFilter = adoptRef(SkPictureImageFilter:: CreateForLocalSpace(picture, sourceBounds, static_cast<SkPaint::FilterLevel>(ima geInterpolationQuality()))); 552 RefPtr<SkPictureImageFilter> pictureFilter = adoptRef(SkPictureImageFilter:: CreateForLocalSpace(picture, sourceBounds, static_cast<SkFilterQuality>(imageInt erpolationQuality())));
553 picturePaint.setImageFilter(pictureFilter.get()); 553 picturePaint.setImageFilter(pictureFilter.get());
554 m_canvas->saveLayer(&sourceBounds, &picturePaint); 554 m_canvas->saveLayer(&sourceBounds, &picturePaint);
555 m_canvas->restore(); 555 m_canvas->restore();
556 m_canvas->restore(); 556 m_canvas->restore();
557 } 557 }
558 558
559 void GraphicsContext::fillPolygon(size_t numPoints, const FloatPoint* points, co nst Color& color, 559 void GraphicsContext::fillPolygon(size_t numPoints, const FloatPoint* points, co nst Color& color,
560 bool shouldAntialias) 560 bool shouldAntialias)
561 { 561 {
562 if (contextDisabled()) 562 if (contextDisabled())
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 isDataComplete); 1815 isDataComplete);
1816 } 1816 }
1817 1817
1818 if (resampling == InterpolationNone) { 1818 if (resampling == InterpolationNone) {
1819 // FIXME: This is to not break tests (it results in the filter bitmap fl ag 1819 // FIXME: This is to not break tests (it results in the filter bitmap fl ag
1820 // being set to true). We need to decide if we respect InterpolationNone 1820 // being set to true). We need to decide if we respect InterpolationNone
1821 // being returned from computeInterpolationQuality. 1821 // being returned from computeInterpolationQuality.
1822 resampling = InterpolationLow; 1822 resampling = InterpolationLow;
1823 } 1823 }
1824 resampling = limitInterpolationQuality(this, resampling); 1824 resampling = limitInterpolationQuality(this, resampling);
1825 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); 1825 paint->setFilterQuality(static_cast<SkFilterQuality>(resampling));
1826 1826
1827 return initialSaveCount; 1827 return initialSaveCount;
1828 } 1828 }
1829 1829
1830 } // namespace blink 1830 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698