| 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 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 // WebFilterOperations altogether. | 1246 // WebFilterOperations altogether. |
| 1247 if (filters.hasReferenceFilter()) { | 1247 if (filters.hasReferenceFilter()) { |
| 1248 if (filters.hasCustomFilter()) { | 1248 if (filters.hasCustomFilter()) { |
| 1249 // Make sure the filters are removed from the platform layer, as the
y are | 1249 // Make sure the filters are removed from the platform layer, as the
y are |
| 1250 // going to fallback to software mode. | 1250 // going to fallback to software mode. |
| 1251 m_layer->layer()->setFilter(0); | 1251 m_layer->layer()->setFilter(0); |
| 1252 m_filters = FilterOperations(); | 1252 m_filters = FilterOperations(); |
| 1253 return false; | 1253 return false; |
| 1254 } | 1254 } |
| 1255 SkiaImageFilterBuilder builder; | 1255 SkiaImageFilterBuilder builder; |
| 1256 FilterOutsets outsets = filters.outsets(); |
| 1257 builder.setCropOffset(FloatSize(outsets.left(), outsets.top())); |
| 1256 RefPtr<SkImageFilter> imageFilter = builder.build(filters); | 1258 RefPtr<SkImageFilter> imageFilter = builder.build(filters); |
| 1257 m_layer->layer()->setFilter(imageFilter.get()); | 1259 m_layer->layer()->setFilter(imageFilter.get()); |
| 1258 } else { | 1260 } else { |
| 1259 OwnPtr<WebFilterOperations> webFilters = adoptPtr(Platform::current()->c
ompositorSupport()->createFilterOperations()); | 1261 OwnPtr<WebFilterOperations> webFilters = adoptPtr(Platform::current()->c
ompositorSupport()->createFilterOperations()); |
| 1260 if (!copyWebCoreFilterOperationsToWebFilterOperations(filters, *webFilte
rs)) { | 1262 if (!copyWebCoreFilterOperationsToWebFilterOperations(filters, *webFilte
rs)) { |
| 1261 // Make sure the filters are removed from the platform layer, as the
y are | 1263 // Make sure the filters are removed from the platform layer, as the
y are |
| 1262 // going to fallback to software mode. | 1264 // going to fallback to software mode. |
| 1263 webFilters->clear(); | 1265 webFilters->clear(); |
| 1264 m_layer->layer()->setFilters(*webFilters); | 1266 m_layer->layer()->setFilters(*webFilters); |
| 1265 m_filters = FilterOperations(); | 1267 m_filters = FilterOperations(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 #ifndef NDEBUG | 1333 #ifndef NDEBUG |
| 1332 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1334 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
| 1333 { | 1335 { |
| 1334 if (!layer) | 1336 if (!layer) |
| 1335 return; | 1337 return; |
| 1336 | 1338 |
| 1337 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); | 1339 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); |
| 1338 fprintf(stderr, "%s\n", output.utf8().data()); | 1340 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1339 } | 1341 } |
| 1340 #endif | 1342 #endif |
| OLD | NEW |