aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-31 17:49:12 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-31 17:49:12 +0000
commit86fc266eda887920e3dd104bee8121ae19729cf5 (patch)
treeca43dd64735b058926a9efaf6e3c9a7cf65e2fd4 /gyp
parent70fdc128377bac81dac987fdc996a1b4e269e1fb (diff)
Implement SkXfermode image filter. This required changing the signature of SkXfermode::asNewEffectOrCoeffs(), to add an optional background texture.
For the raster path, we do a straightforward 2-pass method: draw background, then composite the foreground over it. For the GPU path, if the xfermode can be expressed as an effect, we build an effect with the background texture incorporated, then do a single-pass draw fetching both foreground and background textures, and compositing to the result. If the xfermode is expressed as src/dst coefficients, we do a 2-pass draw as in the raster path and use fixed-function blending. R=bsalomon@google.com, reed@google.com Review URL: https://codereview.chromium.org/16125008 git-svn-id: http://skia.googlecode.com/svn/trunk@9373 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gyp')
-rw-r--r--gyp/effects.gypi8
-rw-r--r--gyp/gmslides.gypi1
2 files changed, 6 insertions, 3 deletions
diff --git a/gyp/effects.gypi b/gyp/effects.gypi
index 1730ffc5df..36638ebe9d 100644
--- a/gyp/effects.gypi
+++ b/gyp/effects.gypi
@@ -9,8 +9,8 @@
'sources': [
'<(skia_src_path)/effects/Sk1DPathEffect.cpp',
'<(skia_src_path)/effects/Sk2DPathEffect.cpp',
- '<(skia_src_path)/effects/SkAvoidXfermode.cpp',
'<(skia_src_path)/effects/SkArithmeticMode.cpp',
+ '<(skia_src_path)/effects/SkAvoidXfermode.cpp',
'<(skia_src_path)/effects/SkBicubicImageFilter.cpp',
'<(skia_src_path)/effects/SkBitmapSource.cpp',
'<(skia_src_path)/effects/SkBlendImageFilter.cpp',
@@ -36,6 +36,7 @@
'<(skia_src_path)/effects/SkLayerRasterizer.cpp',
'<(skia_src_path)/effects/SkLerpXfermode.cpp',
'<(skia_src_path)/effects/SkLightingImageFilter.cpp',
+ '<(skia_src_path)/effects/SkMagnifierImageFilter.cpp',
'<(skia_src_path)/effects/SkMatrixConvolutionImageFilter.cpp',
'<(skia_src_path)/effects/SkMergeImageFilter.cpp',
'<(skia_src_path)/effects/SkMorphologyImageFilter.cpp',
@@ -50,7 +51,7 @@
'<(skia_src_path)/effects/SkTableMaskFilter.cpp',
'<(skia_src_path)/effects/SkTestImageFilters.cpp',
'<(skia_src_path)/effects/SkTransparentShader.cpp',
- '<(skia_src_path)/effects/SkMagnifierImageFilter.cpp',
+ '<(skia_src_path)/effects/SkXfermodeImageFilter.cpp',
'<(skia_src_path)/effects/gradients/SkBitmapCache.cpp',
'<(skia_src_path)/effects/gradients/SkBitmapCache.h',
@@ -72,8 +73,9 @@
'<(skia_include_path)/effects/Sk1DPathEffect.h',
'<(skia_include_path)/effects/Sk2DPathEffect.h',
- '<(skia_include_path)/effects/SkAvoidXfermode.h',
+ '<(skia_include_path)/effects/SkXfermodeImageFilter.h',
'<(skia_include_path)/effects/SkArithmeticMode.h',
+ '<(skia_include_path)/effects/SkAvoidXfermode.h',
'<(skia_include_path)/effects/SkBitmapSource.h',
'<(skia_include_path)/effects/SkBlendImageFilter.h',
'<(skia_include_path)/effects/SkBlurDrawLooper.h',
diff --git a/gyp/gmslides.gypi b/gyp/gmslides.gypi
index ca833a5b08..e56d62bd79 100644
--- a/gyp/gmslides.gypi
+++ b/gyp/gmslides.gypi
@@ -109,6 +109,7 @@
'../gm/verttext.cpp',
'../gm/verttext2.cpp',
'../gm/verylargebitmap.cpp',
+ '../gm/xfermodeimagefilter.cpp',
'../gm/xfermodes.cpp',
'../gm/xfermodes2.cpp',
],