| 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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 setContentsTo(m_imageLayer ? m_imageLayer->layer() : 0); | 1117 setContentsTo(m_imageLayer ? m_imageLayer->layer() : 0); |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 WebLayer* GraphicsLayer::platformLayer() const | 1120 WebLayer* GraphicsLayer::platformLayer() const |
| 1121 { | 1121 { |
| 1122 return m_layer->layer(); | 1122 return m_layer->layer(); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 void GraphicsLayer::setFilters(const FilterOperations& filters) | 1125 void GraphicsLayer::setFilters(const FilterOperations& filters) |
| 1126 { | 1126 { |
| 1127 SkiaImageFilterBuilder builder; | |
| 1128 OwnPtr<CompositorFilterOperations> webFilters = adoptPtr(CompositorFactory::
current().createFilterOperations()); | 1127 OwnPtr<CompositorFilterOperations> webFilters = adoptPtr(CompositorFactory::
current().createFilterOperations()); |
| 1129 builder.buildFilterOperations(filters, webFilters.get()); | 1128 SkiaImageFilterBuilder::buildFilterOperations(filters, webFilters.get()); |
| 1130 m_layer->layer()->setFilters(webFilters->asFilterOperations()); | 1129 m_layer->layer()->setFilters(webFilters->asFilterOperations()); |
| 1131 } | 1130 } |
| 1132 | 1131 |
| 1133 void GraphicsLayer::setBackdropFilters(const FilterOperations& filters) | 1132 void GraphicsLayer::setBackdropFilters(const FilterOperations& filters) |
| 1134 { | 1133 { |
| 1135 SkiaImageFilterBuilder builder; | |
| 1136 OwnPtr<CompositorFilterOperations> webFilters = adoptPtr(CompositorFactory::
current().createFilterOperations()); | 1134 OwnPtr<CompositorFilterOperations> webFilters = adoptPtr(CompositorFactory::
current().createFilterOperations()); |
| 1137 builder.buildFilterOperations(filters, webFilters.get()); | 1135 SkiaImageFilterBuilder::buildFilterOperations(filters, webFilters.get()); |
| 1138 m_layer->layer()->setBackgroundFilters(webFilters->asFilterOperations()); | 1136 m_layer->layer()->setBackgroundFilters(webFilters->asFilterOperations()); |
| 1139 } | 1137 } |
| 1140 | 1138 |
| 1141 void GraphicsLayer::setFilterQuality(SkFilterQuality filterQuality) | 1139 void GraphicsLayer::setFilterQuality(SkFilterQuality filterQuality) |
| 1142 { | 1140 { |
| 1143 if (m_imageLayer) | 1141 if (m_imageLayer) |
| 1144 m_imageLayer->setNearestNeighbor(filterQuality == kNone_SkFilterQuality)
; | 1142 m_imageLayer->setNearestNeighbor(filterQuality == kNone_SkFilterQuality)
; |
| 1145 } | 1143 } |
| 1146 | 1144 |
| 1147 void GraphicsLayer::setPaintingPhase(GraphicsLayerPaintingPhase phase) | 1145 void GraphicsLayer::setPaintingPhase(GraphicsLayerPaintingPhase phase) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 { | 1224 { |
| 1227 if (!layer) { | 1225 if (!layer) { |
| 1228 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1226 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1229 return; | 1227 return; |
| 1230 } | 1228 } |
| 1231 | 1229 |
| 1232 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1230 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1233 fprintf(stderr, "%s\n", output.utf8().data()); | 1231 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1234 } | 1232 } |
| 1235 #endif | 1233 #endif |
| OLD | NEW |