aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-08-18 09:43:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-18 09:43:28 -0700
commit2d141ba2df8f7506848aa9369f502944e837cd09 (patch)
tree0b669c1b2694b024e1bf93bec11d86dcb256fe87 /src/core
parentf05271581fc6204c2b7ccf146af5d02eec27e670 (diff)
Patches on top of Radu's latest.
patch from issue 1273033005 at patchset 120001 (http://crrev.com/1273033005#ps120001) BUG=skia: Review URL: https://codereview.chromium.org/1288323004
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkOpts.cpp2
-rw-r--r--src/core/SkOpts.h9
-rw-r--r--src/core/SkPMFloat.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp
index 890d9c7532..d5308e708e 100644
--- a/src/core/SkOpts.cpp
+++ b/src/core/SkOpts.cpp
@@ -11,6 +11,7 @@
#define SK_OPTS_NS portable
#include "SkBlitMask_opts.h"
#include "SkBlurImageFilter_opts.h"
+#include "SkColorCubeFilter_opts.h"
#include "SkFloatingPoint_opts.h"
#include "SkMorphologyImageFilter_opts.h"
#include "SkTextureCompressor_opts.h"
@@ -38,6 +39,7 @@ namespace SkOpts {
decltype(memset16) memset16 = portable::memset16;
decltype(memset32) memset32 = portable::memset32;
decltype(create_xfermode) create_xfermode = SkCreate4pxXfermode;
+ decltype(color_cube_filter_span) color_cube_filter_span = portable::color_cube_filter_span;
decltype(box_blur_xx) box_blur_xx = portable::box_blur_xx;
decltype(box_blur_xy) box_blur_xy = portable::box_blur_xy;
diff --git a/src/core/SkOpts.h b/src/core/SkOpts.h
index e0ef7dc424..04aa9b1753 100644
--- a/src/core/SkOpts.h
+++ b/src/core/SkOpts.h
@@ -44,6 +44,15 @@ namespace SkOpts {
extern bool (*fill_block_dimensions)(SkTextureCompressor::Format, int* x, int* y);
extern void (*blit_mask_d32_a8)(SkPMColor*, size_t, const SkAlpha*, size_t, SkColor, int, int);
+
+ // This function is an optimized version of SkColorCubeFilter::filterSpan
+ extern void (*color_cube_filter_span)(const SkPMColor[],
+ int,
+ SkPMColor[],
+ const int * [2],
+ const SkScalar * [2],
+ int,
+ const SkColor*);
}
#endif//SkOpts_DEFINED
diff --git a/src/core/SkPMFloat.h b/src/core/SkPMFloat.h
index f97f25c9c6..1fc80f5004 100644
--- a/src/core/SkPMFloat.h
+++ b/src/core/SkPMFloat.h
@@ -26,6 +26,7 @@ class SkPMFloat : public Sk4f {
public:
static SkPMFloat FromPMColor(SkPMColor c) { return SkPMFloat(c); }
static SkPMFloat FromARGB(float a, float r, float g, float b) { return SkPMFloat(a,r,g,b); }
+ static SkPMFloat FromBGRx(SkColor c); // Ignores c's alpha, instead forcing it to 1.
Sk4f alphas() const; // argb -> aaaa, generally faster than the equivalent Sk4f(this->a()).