| Index: public/common/WebFilterOperation.h
|
| diff --git a/public/platform/WebFilterOperation.h b/public/common/WebFilterOperation.h
|
| similarity index 87%
|
| copy from public/platform/WebFilterOperation.h
|
| copy to public/common/WebFilterOperation.h
|
| index 140768986845214aebde89b1642788477d3b16bf..fda614ac7f6107a4218b7fa89cca177fdd7db0a0 100644
|
| --- a/public/platform/WebFilterOperation.h
|
| +++ b/public/common/WebFilterOperation.h
|
| @@ -27,9 +27,9 @@
|
| #define WebFilterOperation_h
|
|
|
| #include "SkScalar.h"
|
| -#include "WebCommon.h"
|
| +#include "WebAssertion.h"
|
| #include "WebColor.h"
|
| -#include "WebPoint.h"
|
| +#include "WebCommonExport.h"
|
|
|
| namespace WebKit {
|
|
|
| @@ -69,10 +69,15 @@ public:
|
| || m_type == FilterTypeSaturatingBrightness);
|
| return m_amount;
|
| }
|
| - WebPoint dropShadowOffset() const
|
| + int dropShadowOffsetX() const
|
| {
|
| WEBKIT_ASSERT(m_type == FilterTypeDropShadow);
|
| - return m_dropShadowOffset;
|
| + return m_dropShadowOffsetX;
|
| + }
|
| + int dropShadowOffsetY() const
|
| + {
|
| + WEBKIT_ASSERT(m_type == FilterTypeDropShadow);
|
| + return m_dropShadowOffsetY;
|
| }
|
| WebColor dropShadowColor() const
|
| {
|
| @@ -100,7 +105,7 @@ public:
|
| static WebFilterOperation createContrastFilter(float amount) { return WebFilterOperation(FilterTypeContrast, amount); }
|
| static WebFilterOperation createOpacityFilter(float amount) { return WebFilterOperation(FilterTypeOpacity, amount); }
|
| static WebFilterOperation createBlurFilter(float amount) { return WebFilterOperation(FilterTypeBlur, amount); }
|
| - static WebFilterOperation createDropShadowFilter(WebPoint offset, float stdDeviation, WebColor color) { return WebFilterOperation(FilterTypeDropShadow, offset, stdDeviation, color); }
|
| + static WebFilterOperation createDropShadowFilter(int offsetX, int offsetY, float stdDeviation, WebColor color) { return WebFilterOperation(FilterTypeDropShadow, offsetX, offsetY, stdDeviation, color); }
|
| static WebFilterOperation createColorMatrixFilter(SkScalar matrix[20]) { return WebFilterOperation(FilterTypeColorMatrix, matrix); }
|
| static WebFilterOperation createZoomFilter(float amount, int inset) { return WebFilterOperation(FilterTypeZoom, amount, inset); }
|
| static WebFilterOperation createSaturatingBrightnessFilter(float amount) { return WebFilterOperation(FilterTypeSaturatingBrightness, amount); }
|
| @@ -126,10 +131,11 @@ public:
|
| || m_type == FilterTypeSaturatingBrightness);
|
| m_amount = amount;
|
| }
|
| - void setDropShadowOffset(WebPoint offset)
|
| + void setDropShadowOffset(int x, int y)
|
| {
|
| WEBKIT_ASSERT(m_type == FilterTypeDropShadow);
|
| - m_dropShadowOffset = offset;
|
| + m_dropShadowOffsetX = x;
|
| + m_dropShadowOffsetY = y;
|
| }
|
| void setDropShadowColor(WebColor color)
|
| {
|
| @@ -152,7 +158,8 @@ private:
|
| FilterType m_type;
|
|
|
| float m_amount;
|
| - WebPoint m_dropShadowOffset;
|
| + int m_dropShadowOffsetX;
|
| + int m_dropShadowOffsetY;
|
| WebColor m_dropShadowColor;
|
| SkScalar m_matrix[20];
|
| int m_zoomInset;
|
| @@ -160,7 +167,8 @@ private:
|
| WebFilterOperation(FilterType type, float amount)
|
| : m_type(type)
|
| , m_amount(amount)
|
| - , m_dropShadowOffset(0, 0)
|
| + , m_dropShadowOffsetX(0)
|
| + , m_dropShadowOffsetY(0)
|
| , m_dropShadowColor(0)
|
| , m_zoomInset(0)
|
| {
|
| @@ -168,10 +176,11 @@ private:
|
| memset(m_matrix, 0, sizeof(m_matrix));
|
| }
|
|
|
| - WebFilterOperation(FilterType type, WebPoint offset, float stdDeviation, WebColor color)
|
| + WebFilterOperation(FilterType type, int offsetX, int offsetY, float stdDeviation, WebColor color)
|
| : m_type(type)
|
| , m_amount(stdDeviation)
|
| - , m_dropShadowOffset(offset)
|
| + , m_dropShadowOffsetX(offsetX)
|
| + , m_dropShadowOffsetY(offsetY)
|
| , m_dropShadowColor(color)
|
| , m_zoomInset(0)
|
| {
|
| @@ -179,12 +188,13 @@ private:
|
| memset(m_matrix, 0, sizeof(m_matrix));
|
| }
|
|
|
| - WEBKIT_EXPORT WebFilterOperation(FilterType, SkScalar matrix[20]);
|
| + BLINK_COMMON_EXPORT WebFilterOperation(FilterType, SkScalar matrix[20]);
|
|
|
| WebFilterOperation(FilterType type, float amount, int inset)
|
| : m_type(type)
|
| , m_amount(amount)
|
| - , m_dropShadowOffset(0, 0)
|
| + , m_dropShadowOffsetX(0)
|
| + , m_dropShadowOffsetY(0)
|
| , m_dropShadowColor(0)
|
| , m_zoomInset(inset)
|
| {
|
|
|