diff options
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/page/Settings.cpp | 6 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/GLUtils.cpp | 5 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsContextAndroid.cpp | 11 |
3 files changed, 10 insertions, 12 deletions
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp index 8e8d43b..aa758c4 100644 --- a/WebCore/page/Settings.cpp +++ b/WebCore/page/Settings.cpp @@ -160,12 +160,12 @@ Settings::Settings(Page* page) , m_interactiveFormValidation(false) , m_usePreHTML5ParserQuirks(false) , m_hyperlinkAuditingEnabled(false) -#if ENABLE(WEB_AUTOFILL) - , m_autoFillEnabled(false) -#endif #ifdef ANDROID_PLUGINS , m_pluginsOnDemand(false) #endif +#if ENABLE(WEB_AUTOFILL) + , m_autoFillEnabled(false) +#endif { // A Frame may not have been created yet, so we initialize the AtomicString // hash before trying to use it. diff --git a/WebCore/platform/graphics/android/GLUtils.cpp b/WebCore/platform/graphics/android/GLUtils.cpp index e9c0796..1c84fe2 100644 --- a/WebCore/platform/graphics/android/GLUtils.cpp +++ b/WebCore/platform/graphics/android/GLUtils.cpp @@ -121,14 +121,15 @@ bool GLUtils::isEGLImageSupported() { const char* eglExtensions = eglQueryString(eglGetCurrentDisplay(), EGL_EXTENSIONS); const char* glExtensions = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); - return strstr(eglExtensions, "EGL_KHR_image_base") && + return eglExtensions && glExtensions && + strstr(eglExtensions, "EGL_KHR_image_base") && strstr(eglExtensions, "EGL_KHR_gl_texture_2D_image") && strstr(glExtensions, "GL_OES_EGL_image"); } bool GLUtils::isEGLFenceSyncSupported() { const char* eglExtensions = eglQueryString(eglGetCurrentDisplay(), EGL_EXTENSIONS); - return strstr(eglExtensions, "EGL_KHR_fence_sync"); + return eglExtensions && strstr(eglExtensions, "EGL_KHR_fence_sync"); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp index b76f5d5..5d38295 100644 --- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp @@ -70,7 +70,7 @@ template <typename T> T* deepCopyPtr(const T* src) // Is Color premultiplied or not? If it is, then I can't blindly pass it to paint.setColor() struct ShadowRec { - SkScalar blur; // >0 means valid shadow + SkScalar blur; // >=0 means valid shadow SkScalar dx; SkScalar dy; SkColor color; @@ -149,13 +149,13 @@ public: bool setupShadowPaint(SkPaint* paint, SkPoint* offset) { - if (shadow.blur > 0) { + if (shadow.blur >= 0) { paint->setAntiAlias(true); paint->setDither(true); paint->setXfermodeMode(mode); paint->setColor(shadow.color); paint->setMaskFilter(SkBlurMaskFilter::Create(shadow.blur, - SkBlurMaskFilter::kNormal_BlurStyle))->unref(); + SkBlurMaskFilter::kNormal_BlurStyle))->safeUnref(); offset->set(shadow.dx, shadow.dy); return true; } @@ -253,7 +253,7 @@ public: paint->setAntiAlias(m_state->useAA); paint->setDither(true); paint->setXfermodeMode(m_state->mode); - if (m_state->shadow.blur > 0) { + if (m_state->shadow.blur >= 0) { SkDrawLooper* looper = new SkBlurDrawLooper(m_state->shadow.blur, m_state->shadow.dx, m_state->shadow.dy, @@ -944,9 +944,6 @@ void GraphicsContext::setPlatformShadow(const FloatSize& size, float blur, const if (paintingDisabled()) return; - if (blur <= 0) - this->clearPlatformShadow(); - SkColor c; if (color.isValid()) c = color.rgb(); |