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

Side by Side Diff: sky/engine/platform/graphics/GraphicsContext.cpp

Issue 893093002: Delete remaining masks dead code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 radii[SkRRect::kUpperRight_Corner].set(SkIntToScalar(topRight.width()), 1642 radii[SkRRect::kUpperRight_Corner].set(SkIntToScalar(topRight.width()),
1643 SkIntToScalar(topRight.height())); 1643 SkIntToScalar(topRight.height()));
1644 radii[SkRRect::kLowerRight_Corner].set(SkIntToScalar(bottomRight.width()), 1644 radii[SkRRect::kLowerRight_Corner].set(SkIntToScalar(bottomRight.width()),
1645 SkIntToScalar(bottomRight.height())); 1645 SkIntToScalar(bottomRight.height()));
1646 radii[SkRRect::kLowerLeft_Corner].set(SkIntToScalar(bottomLeft.width()), 1646 radii[SkRRect::kLowerLeft_Corner].set(SkIntToScalar(bottomLeft.width()),
1647 SkIntToScalar(bottomLeft.height())); 1647 SkIntToScalar(bottomLeft.height()));
1648 } 1648 }
1649 1649
1650 PassRefPtr<SkColorFilter> GraphicsContext::WebCoreColorFilterToSkiaColorFilter(C olorFilter colorFilter) 1650 PassRefPtr<SkColorFilter> GraphicsContext::WebCoreColorFilterToSkiaColorFilter(C olorFilter colorFilter)
1651 { 1651 {
1652 switch (colorFilter) { 1652 // FIXME(sky): Remove
1653 case ColorFilterLuminanceToAlpha:
1654 return adoptRef(SkLumaColorFilter::Create());
1655 case ColorFilterLinearRGBToSRGB:
1656 return ImageBuffer::createColorSpaceFilter(ColorSpaceLinearRGB, ColorSpa ceDeviceRGB);
1657 case ColorFilterSRGBToLinearRGB:
1658 return ImageBuffer::createColorSpaceFilter(ColorSpaceDeviceRGB, ColorSpa ceLinearRGB);
1659 case ColorFilterNone:
1660 break;
1661 default:
1662 ASSERT_NOT_REACHED();
1663 break;
1664 }
1665
1666 return nullptr; 1653 return nullptr;
1667 } 1654 }
1668 1655
1669 void GraphicsContext::draw2xMarker(SkBitmap* bitmap, int index) 1656 void GraphicsContext::draw2xMarker(SkBitmap* bitmap, int index)
1670 { 1657 {
1671 const SkPMColor lineColor = lineColors(index); 1658 const SkPMColor lineColor = lineColors(index);
1672 const SkPMColor antiColor1 = antiColors1(index); 1659 const SkPMColor antiColor1 = antiColors1(index);
1673 const SkPMColor antiColor2 = antiColors2(index); 1660 const SkPMColor antiColor2 = antiColors2(index);
1674 1661
1675 uint32_t* row1 = bitmap->getAddr32(0, 0); 1662 uint32_t* row1 = bitmap->getAddr32(0, 0);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 // FIXME: This is to not break tests (it results in the filter bitmap fl ag 1788 // FIXME: This is to not break tests (it results in the filter bitmap fl ag
1802 // being set to true). We need to decide if we respect InterpolationNone 1789 // being set to true). We need to decide if we respect InterpolationNone
1803 // being returned from computeInterpolationQuality. 1790 // being returned from computeInterpolationQuality.
1804 resampling = InterpolationLow; 1791 resampling = InterpolationLow;
1805 } 1792 }
1806 resampling = limitInterpolationQuality(this, resampling); 1793 resampling = limitInterpolationQuality(this, resampling);
1807 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); 1794 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling));
1808 } 1795 }
1809 1796
1810 } // namespace blink 1797 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/style/StyleRareNonInheritedData.cpp ('k') | sky/engine/platform/graphics/GraphicsTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698