| OLD | NEW |
| 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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 void GraphicsLayer::setFilters(const FilterOperations& filters) | 998 void GraphicsLayer::setFilters(const FilterOperations& filters) |
| 999 { | 999 { |
| 1000 SkiaImageFilterBuilder builder; | 1000 SkiaImageFilterBuilder builder; |
| 1001 OwnPtr<WebFilterOperations> webFilters = adoptPtr(Platform::current()->compo
sitorSupport()->createFilterOperations()); | 1001 OwnPtr<WebFilterOperations> webFilters = adoptPtr(Platform::current()->compo
sitorSupport()->createFilterOperations()); |
| 1002 FilterOutsets outsets = filters.outsets(); | 1002 FilterOutsets outsets = filters.outsets(); |
| 1003 builder.setCropOffset(FloatSize(outsets.left(), outsets.top())); | 1003 builder.setCropOffset(FloatSize(outsets.left(), outsets.top())); |
| 1004 builder.buildFilterOperations(filters, webFilters.get()); | 1004 builder.buildFilterOperations(filters, webFilters.get()); |
| 1005 m_layer->layer()->setFilters(*webFilters); | 1005 m_layer->layer()->setFilters(*webFilters); |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 void GraphicsLayer::setFilterLevel(SkPaint::FilterLevel filterLevel) |
| 1009 { |
| 1010 if (m_imageLayer) |
| 1011 m_imageLayer->setNearestNeighbor(filterLevel == SkPaint::kNone_FilterLev
el); |
| 1012 } |
| 1013 |
| 1008 void GraphicsLayer::setPaintingPhase(GraphicsLayerPaintingPhase phase) | 1014 void GraphicsLayer::setPaintingPhase(GraphicsLayerPaintingPhase phase) |
| 1009 { | 1015 { |
| 1010 if (m_paintingPhase == phase) | 1016 if (m_paintingPhase == phase) |
| 1011 return; | 1017 return; |
| 1012 m_paintingPhase = phase; | 1018 m_paintingPhase = phase; |
| 1013 setNeedsDisplay(); | 1019 setNeedsDisplay(); |
| 1014 } | 1020 } |
| 1015 | 1021 |
| 1016 void GraphicsLayer::addLinkHighlight(LinkHighlightClient* linkHighlight) | 1022 void GraphicsLayer::addLinkHighlight(LinkHighlightClient* linkHighlight) |
| 1017 { | 1023 { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 #ifndef NDEBUG | 1087 #ifndef NDEBUG |
| 1082 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 1088 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
| 1083 { | 1089 { |
| 1084 if (!layer) | 1090 if (!layer) |
| 1085 return; | 1091 return; |
| 1086 | 1092 |
| 1087 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1093 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1088 fprintf(stderr, "%s\n", output.utf8().data()); | 1094 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1089 } | 1095 } |
| 1090 #endif | 1096 #endif |
| OLD | NEW |