| 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 22 matching lines...) Expand all Loading... |
| 33 #include "platform/TraceEvent.h" | 33 #include "platform/TraceEvent.h" |
| 34 #include "platform/geometry/FloatRect.h" | 34 #include "platform/geometry/FloatRect.h" |
| 35 #include "platform/geometry/LayoutRect.h" | 35 #include "platform/geometry/LayoutRect.h" |
| 36 #include "platform/geometry/Region.h" | 36 #include "platform/geometry/Region.h" |
| 37 #include "platform/graphics/BitmapImage.h" | 37 #include "platform/graphics/BitmapImage.h" |
| 38 #include "platform/graphics/CompositorFilterOperations.h" | 38 #include "platform/graphics/CompositorFilterOperations.h" |
| 39 #include "platform/graphics/FirstPaintInvalidationTracking.h" | 39 #include "platform/graphics/FirstPaintInvalidationTracking.h" |
| 40 #include "platform/graphics/GraphicsContext.h" | 40 #include "platform/graphics/GraphicsContext.h" |
| 41 #include "platform/graphics/Image.h" | 41 #include "platform/graphics/Image.h" |
| 42 #include "platform/graphics/LinkHighlight.h" | 42 #include "platform/graphics/LinkHighlight.h" |
| 43 #include "platform/graphics/filters/SkiaImageFilterBuilder.h" | |
| 44 #include "platform/graphics/paint/DrawingRecorder.h" | 43 #include "platform/graphics/paint/DrawingRecorder.h" |
| 45 #include "platform/graphics/paint/PaintController.h" | 44 #include "platform/graphics/paint/PaintController.h" |
| 46 #include "platform/json/JSONValues.h" | 45 #include "platform/json/JSONValues.h" |
| 47 #include "platform/scroll/ScrollableArea.h" | 46 #include "platform/scroll/ScrollableArea.h" |
| 48 #include "platform/text/TextStream.h" | 47 #include "platform/text/TextStream.h" |
| 49 #include "public/platform/Platform.h" | 48 #include "public/platform/Platform.h" |
| 50 #include "public/platform/WebCompositorSupport.h" | 49 #include "public/platform/WebCompositorSupport.h" |
| 51 #include "public/platform/WebFloatPoint.h" | 50 #include "public/platform/WebFloatPoint.h" |
| 52 #include "public/platform/WebFloatRect.h" | 51 #include "public/platform/WebFloatRect.h" |
| 53 #include "public/platform/WebLayer.h" | 52 #include "public/platform/WebLayer.h" |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 } | 1137 } |
| 1139 | 1138 |
| 1140 setContentsTo(m_imageLayer ? m_imageLayer->layer() : 0); | 1139 setContentsTo(m_imageLayer ? m_imageLayer->layer() : 0); |
| 1141 } | 1140 } |
| 1142 | 1141 |
| 1143 WebLayer* GraphicsLayer::platformLayer() const | 1142 WebLayer* GraphicsLayer::platformLayer() const |
| 1144 { | 1143 { |
| 1145 return m_layer->layer(); | 1144 return m_layer->layer(); |
| 1146 } | 1145 } |
| 1147 | 1146 |
| 1148 void GraphicsLayer::setFilters(const FilterOperations& filters) | 1147 void GraphicsLayer::setFilters(CompositorFilterOperations filters) |
| 1149 { | 1148 { |
| 1150 CompositorFilterOperations compositorFilters; | 1149 platformLayer()->setFilters(filters.releaseCcFilterOperations()); |
| 1151 SkiaImageFilterBuilder::buildFilterOperations(filters, &compositorFilters); | |
| 1152 m_layer->layer()->setFilters(compositorFilters.releaseCcFilterOperations()); | |
| 1153 } | 1150 } |
| 1154 | 1151 |
| 1155 void GraphicsLayer::setBackdropFilters(const FilterOperations& filters) | 1152 void GraphicsLayer::setBackdropFilters(CompositorFilterOperations filters) |
| 1156 { | 1153 { |
| 1157 CompositorFilterOperations compositorFilters; | 1154 platformLayer()->setBackgroundFilters(filters.releaseCcFilterOperations()); |
| 1158 SkiaImageFilterBuilder::buildFilterOperations(filters, &compositorFilters); | |
| 1159 m_layer->layer()->setBackgroundFilters(compositorFilters.releaseCcFilterOper
ations()); | |
| 1160 } | 1155 } |
| 1161 | 1156 |
| 1162 void GraphicsLayer::setFilterQuality(SkFilterQuality filterQuality) | 1157 void GraphicsLayer::setFilterQuality(SkFilterQuality filterQuality) |
| 1163 { | 1158 { |
| 1164 if (m_imageLayer) | 1159 if (m_imageLayer) |
| 1165 m_imageLayer->setNearestNeighbor(filterQuality == kNone_SkFilterQuality)
; | 1160 m_imageLayer->setNearestNeighbor(filterQuality == kNone_SkFilterQuality)
; |
| 1166 } | 1161 } |
| 1167 | 1162 |
| 1168 void GraphicsLayer::setPaintingPhase(GraphicsLayerPaintingPhase phase) | 1163 void GraphicsLayer::setPaintingPhase(GraphicsLayerPaintingPhase phase) |
| 1169 { | 1164 { |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 { | 1348 { |
| 1354 if (!layer) { | 1349 if (!layer) { |
| 1355 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1350 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1356 return; | 1351 return; |
| 1357 } | 1352 } |
| 1358 | 1353 |
| 1359 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1354 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1360 fprintf(stderr, "%s\n", output.utf8().data()); | 1355 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1361 } | 1356 } |
| 1362 #endif | 1357 #endif |
| OLD | NEW |