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 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 } | 1126 } |
1127 | 1127 |
1128 WebLayer* GraphicsLayer::platformLayer() const | 1128 WebLayer* GraphicsLayer::platformLayer() const |
1129 { | 1129 { |
1130 return m_layer->layer(); | 1130 return m_layer->layer(); |
1131 } | 1131 } |
1132 | 1132 |
1133 void GraphicsLayer::setFilters(const FilterOperations& filters) | 1133 void GraphicsLayer::setFilters(const FilterOperations& filters) |
1134 { | 1134 { |
1135 SkiaImageFilterBuilder builder; | 1135 SkiaImageFilterBuilder builder; |
1136 OwnPtr<CompositorFilterOperations> webFilters = adoptPtr(CompositorFactory::
current().createFilterOperations()); | 1136 OwnPtr<CompositorFilterOperations> webFilters = CompositorFactory::current()
.createFilterOperations(); |
1137 builder.buildFilterOperations(filters, webFilters.get()); | 1137 builder.buildFilterOperations(filters, webFilters.get()); |
1138 m_layer->layer()->setFilters(webFilters->asFilterOperations()); | 1138 m_layer->layer()->setFilters(webFilters->asFilterOperations()); |
1139 } | 1139 } |
1140 | 1140 |
1141 void GraphicsLayer::setBackdropFilters(const FilterOperations& filters) | 1141 void GraphicsLayer::setBackdropFilters(const FilterOperations& filters) |
1142 { | 1142 { |
1143 SkiaImageFilterBuilder builder; | 1143 SkiaImageFilterBuilder builder; |
1144 OwnPtr<CompositorFilterOperations> webFilters = adoptPtr(CompositorFactory::
current().createFilterOperations()); | 1144 OwnPtr<CompositorFilterOperations> webFilters = CompositorFactory::current()
.createFilterOperations(); |
1145 builder.buildFilterOperations(filters, webFilters.get()); | 1145 builder.buildFilterOperations(filters, webFilters.get()); |
1146 m_layer->layer()->setBackgroundFilters(webFilters->asFilterOperations()); | 1146 m_layer->layer()->setBackgroundFilters(webFilters->asFilterOperations()); |
1147 } | 1147 } |
1148 | 1148 |
1149 void GraphicsLayer::setFilterQuality(SkFilterQuality filterQuality) | 1149 void GraphicsLayer::setFilterQuality(SkFilterQuality filterQuality) |
1150 { | 1150 { |
1151 if (m_imageLayer) | 1151 if (m_imageLayer) |
1152 m_imageLayer->setNearestNeighbor(filterQuality == kNone_SkFilterQuality)
; | 1152 m_imageLayer->setNearestNeighbor(filterQuality == kNone_SkFilterQuality)
; |
1153 } | 1153 } |
1154 | 1154 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 { | 1252 { |
1253 if (!layer) { | 1253 if (!layer) { |
1254 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1254 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
1255 return; | 1255 return; |
1256 } | 1256 } |
1257 | 1257 |
1258 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1258 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1259 fprintf(stderr, "%s\n", output.utf8().data()); | 1259 fprintf(stderr, "%s\n", output.utf8().data()); |
1260 } | 1260 } |
1261 #endif | 1261 #endif |
OLD | NEW |