Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1018)

Unified Diff: Source/platform/graphics/filters/FEDisplacementMap.cpp

Issue 107713004: Move all filters-related files from core/platform to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Maybe fix win build. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/filters/FEDisplacementMap.cpp
diff --git a/Source/core/platform/graphics/filters/FEDisplacementMap.cpp b/Source/platform/graphics/filters/FEDisplacementMap.cpp
similarity index 98%
rename from Source/core/platform/graphics/filters/FEDisplacementMap.cpp
rename to Source/platform/graphics/filters/FEDisplacementMap.cpp
index 3d99a7247779a680b719a95c6a0d0abb408f9d7e..c77e932a36b4b1116b23b8408b7be46ecfb48852 100644
--- a/Source/core/platform/graphics/filters/FEDisplacementMap.cpp
+++ b/Source/platform/graphics/filters/FEDisplacementMap.cpp
@@ -23,18 +23,16 @@
*/
#include "config.h"
+#include "platform/graphics/filters/FEDisplacementMap.h"
-#include "core/platform/graphics/filters/FEDisplacementMap.h"
-
+#include "SkBitmapSource.h"
+#include "SkDisplacementMapEffect.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/filters/SkiaImageFilterBuilder.h"
#include "platform/graphics/skia/NativeImageSkia.h"
#include "platform/text/TextStream.h"
#include "wtf/Uint8ClampedArray.h"
-#include "SkBitmapSource.h"
-#include "SkDisplacementMapEffect.h"
-
namespace WebCore {
FEDisplacementMap::FEDisplacementMap(Filter* filter, ChannelSelectorType xChannelSelector, ChannelSelectorType yChannelSelector, float scale)
@@ -142,9 +140,9 @@ void FEDisplacementMap::applySoftware()
int srcX = x + static_cast<int>(scaleForColorX * srcPixelArrayB->item(dstIndex + m_xChannelSelector - 1) + scaledOffsetX);
int srcY = y + static_cast<int>(scaleForColorY * srcPixelArrayB->item(dstIndex + m_yChannelSelector - 1) + scaledOffsetY);
for (unsigned channel = 0; channel < 4; ++channel) {
- if (srcX < 0 || srcX >= paintSize.width() || srcY < 0 || srcY >= paintSize.height())
+ if (srcX < 0 || srcX >= paintSize.width() || srcY < 0 || srcY >= paintSize.height()) {
dstPixelArray->set(dstIndex + channel, static_cast<unsigned char>(0));
- else {
+ } else {
unsigned char pixelValue = srcPixelArrayA->item(srcY * stride + srcX * 4 + channel);
dstPixelArray->set(dstIndex + channel, pixelValue);
}
« no previous file with comments | « Source/platform/graphics/filters/FEDisplacementMap.h ('k') | Source/platform/graphics/filters/FEDropShadow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698