WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
patch-108743.patch (text/plain), 4.94 KB, created by
Kyungjin Kim
on 2013-02-01 21:12:02 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Kyungjin Kim
Created:
2013-02-01 21:12:02 PST
Size:
4.94 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b91d3cf..8044cd9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+2013-02-01 Kyungjin Kim <gen.kim@samsung.com> >+ >+ [EFL][Cairo] Expose isAccelerated and setAccelerated for EFL >+ https://bugs.webkit.org/show_bug.cgi?id=108743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ isAccelerated and setAccelerated are exposed for the ports using Skia and CG, but not Cairo. >+ This patch adds them in Cairo for EFL. >+ >+ No new tests. Covered by existing tests. >+ >+ * platform/graphics/GraphicsContext.cpp: >+ (WebCore): >+ * platform/graphics/cairo/GraphicsContextCairo.cpp: >+ (WebCore::GraphicsContext::isAcceleratedContext): >+ (WebCore): >+ * platform/graphics/cairo/ImageBufferCairo.cpp: >+ (WebCore::ImageBuffer::ImageBuffer): >+ * platform/graphics/cairo/PlatformContextCairo.cpp: >+ (WebCore::PlatformContextCairo::PlatformContextCairo): >+ * platform/graphics/cairo/PlatformContextCairo.h: >+ (WebCore::PlatformContextCairo::isAccelerated): >+ (WebCore::PlatformContextCairo::setAccelerated): >+ (PlatformContextCairo): >+ > 2013-02-01 Roger Fong <roger_fong@apple.com> > > Unreviewed. Clean up WebCore VS2010 project. >diff --git a/Source/WebCore/platform/graphics/GraphicsContext.cpp b/Source/WebCore/platform/graphics/GraphicsContext.cpp >index 1d57207..f220a02 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContext.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsContext.cpp >@@ -742,7 +742,7 @@ void GraphicsContext::setPlatformShouldSmoothFonts(bool) > } > #endif > >-#if !USE(SKIA) && !USE(CG) >+#if !USE(SKIA) && !USE(CG) && !USE(CAIRO) > bool GraphicsContext::isAcceleratedContext() const > { > return false; >diff --git a/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp b/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp >index 069ac29..cd04df2 100644 >--- a/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp >+++ b/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp >@@ -1159,6 +1159,11 @@ void GraphicsContext::set3DTransform(const TransformationMatrix& transform) > } > #endif > >+bool GraphicsContext::isAcceleratedContext() const >+{ >+ return platformContext()->isAccelerated(); >+} >+ > } // namespace WebCore > > #endif // USE(CAIRO) >diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp b/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >index 6953932..c9285c64 100644 >--- a/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >+++ b/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >@@ -54,7 +54,7 @@ ImageBufferData::ImageBufferData(const IntSize&) > { > } > >-ImageBuffer::ImageBuffer(const IntSize& size, float /* resolutionScale */, ColorSpace, RenderingMode, DeferralMode, bool& success) >+ImageBuffer::ImageBuffer(const IntSize& size, float /* resolutionScale */, ColorSpace, RenderingMode renderingMode, DeferralMode, bool& success) > : m_data(size) > , m_size(size) > , m_logicalSize(size) >@@ -70,6 +70,12 @@ ImageBuffer::ImageBuffer(const IntSize& size, float /* resolutionScale */, Color > m_data.m_platformContext.setCr(cr.get()); > m_context = adoptPtr(new GraphicsContext(&m_data.m_platformContext)); > success = true; >+#if ENABLE(ACCELERATED_2D_CANVAS) >+ if (renderingMode == Accelerated) >+ context()->platformContext()->setAccelerated(true); >+#else >+ UNUSED_PARAM(renderingMode); >+#endif > } > > ImageBuffer::~ImageBuffer() >diff --git a/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp b/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp >index 865d152..92fd924 100644 >--- a/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp >+++ b/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp >@@ -82,6 +82,7 @@ public: > > PlatformContextCairo::PlatformContextCairo(cairo_t* cr) > : m_cr(cr) >+ , m_accelerated(false) > { > m_stateStack.append(State()); > m_state = &m_stateStack.last(); >diff --git a/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.h b/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.h >index d7f1205..436407ae 100644 >--- a/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.h >+++ b/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.h >@@ -67,6 +67,9 @@ public: > enum AlphaPreservation { DoNotPreserveAlpha, PreserveAlpha }; > void prepareForStroking(const GraphicsContextState&, AlphaPreservation = PreserveAlpha); > >+ bool isAccelerated() const { return m_accelerated; } >+ void setAccelerated(bool accelerated) { m_accelerated = accelerated; } >+ > private: > void clipForPatternFilling(const GraphicsContextState&); > >@@ -79,6 +82,7 @@ private: > // GraphicsContext is responsible for managing the state of the ShadowBlur, > // so it does not need to be on the state stack. > ShadowBlur m_shadowBlur; >+ bool m_accelerated; > > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 108743
: 186212