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

Side by Side Diff: Source/platform/graphics/GraphicsLayer.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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 void GraphicsLayer::setFilters(const FilterOperations& filters) 1080 void GraphicsLayer::setFilters(const FilterOperations& filters)
1081 { 1081 {
1082 SkiaImageFilterBuilder builder; 1082 SkiaImageFilterBuilder builder;
1083 OwnPtr<WebFilterOperations> webFilters = adoptPtr(Platform::current()->compo sitorSupport()->createFilterOperations()); 1083 OwnPtr<WebFilterOperations> webFilters = adoptPtr(Platform::current()->compo sitorSupport()->createFilterOperations());
1084 FilterOutsets outsets = filters.outsets(); 1084 FilterOutsets outsets = filters.outsets();
1085 builder.setCropOffset(FloatSize(outsets.left(), outsets.top())); 1085 builder.setCropOffset(FloatSize(outsets.left(), outsets.top()));
1086 builder.buildFilterOperations(filters, webFilters.get()); 1086 builder.buildFilterOperations(filters, webFilters.get());
1087 m_layer->layer()->setFilters(*webFilters); 1087 m_layer->layer()->setFilters(*webFilters);
1088 } 1088 }
1089 1089
1090 void GraphicsLayer::setFilterLevel(SkPaint::FilterLevel filterLevel) 1090 void GraphicsLayer::setFilterQuality(SkFilterQuality filterQuality)
1091 { 1091 {
1092 if (m_imageLayer) 1092 if (m_imageLayer)
1093 m_imageLayer->setNearestNeighbor(filterLevel == SkPaint::kNone_FilterLev el); 1093 m_imageLayer->setNearestNeighbor(filterQuality == kNone_SkFilterQuality) ;
1094 } 1094 }
1095 1095
1096 void GraphicsLayer::setPaintingPhase(GraphicsLayerPaintingPhase phase) 1096 void GraphicsLayer::setPaintingPhase(GraphicsLayerPaintingPhase phase)
1097 { 1097 {
1098 if (m_paintingPhase == phase) 1098 if (m_paintingPhase == phase)
1099 return; 1099 return;
1100 m_paintingPhase = phase; 1100 m_paintingPhase = phase;
1101 setNeedsDisplay(); 1101 setNeedsDisplay();
1102 } 1102 }
1103 1103
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 #ifndef NDEBUG 1172 #ifndef NDEBUG
1173 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) 1173 void showGraphicsLayerTree(const blink::GraphicsLayer* layer)
1174 { 1174 {
1175 if (!layer) 1175 if (!layer)
1176 return; 1176 return;
1177 1177
1178 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1178 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1179 fprintf(stderr, "%s\n", output.utf8().data()); 1179 fprintf(stderr, "%s\n", output.utf8().data());
1180 } 1180 }
1181 #endif 1181 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698