1 diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
2 index 7808ec0..f6c373d 100644
3 --- a/Source/WebCore/ChangeLog
4 +++ b/Source/WebCore/ChangeLog
6 +2013-01-31 Kyungjin Kim <gen.kim@samsung.com>
8 + [EFL][Cairo] Expose isAccelerated and setAccelerated for EFL
9 + Need the bug URL (OOPS!).
11 + Reviewed by NOBODY (OOPS!).
13 + isAccelerated and setAccelerated are exposed for the ports using Skia and CG, but not Cairo
14 + This patch adds them in Cairo for EFL and other ports using it.
16 + No new tests. Covered by existing tests.
18 + * platform/graphics/GraphicsContext.cpp:
20 + * platform/graphics/cairo/GraphicsContextCairo.cpp:
21 + (WebCore::GraphicsContext::isAcceleratedContext):
23 + * platform/graphics/cairo/ImageBufferCairo.cpp:
24 + (WebCore::ImageBuffer::ImageBuffer):
25 + * platform/graphics/cairo/PlatformContextCairo.cpp:
26 + (WebCore::PlatformContextCairo::PlatformContextCairo):
27 + * platform/graphics/cairo/PlatformContextCairo.h:
28 + (WebCore::PlatformContextCairo::isAccelerated):
29 + (WebCore::PlatformContextCairo::setAccelerated):
30 + (PlatformContextCairo):
32 2013-01-30 Patrick Gansterer <paroga@webkit.org>
34 Port DragImageWin.cpp to WinCE
35 diff --git a/Source/WebCore/platform/graphics/GraphicsContext.cpp b/Source/WebCore/platform/graphics/GraphicsContext.cpp
36 index 1d57207..f220a02 100644
37 --- a/Source/WebCore/platform/graphics/GraphicsContext.cpp
38 +++ b/Source/WebCore/platform/graphics/GraphicsContext.cpp
39 @@ -742,7 +742,7 @@ void GraphicsContext::setPlatformShouldSmoothFonts(bool)
43 -#if !USE(SKIA) && !USE(CG)
44 +#if !USE(SKIA) && !USE(CG) && !USE(CAIRO)
45 bool GraphicsContext::isAcceleratedContext() const
48 diff --git a/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp b/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
49 index 069ac29..cd04df2 100644
50 --- a/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
51 +++ b/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
52 @@ -1159,6 +1159,11 @@ void GraphicsContext::set3DTransform(const TransformationMatrix& transform)
56 +bool GraphicsContext::isAcceleratedContext() const
58 + return platformContext()->isAccelerated();
61 } // namespace WebCore
64 diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp b/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
65 index 6953932..c9285c64 100644
66 --- a/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
67 +++ b/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
68 @@ -54,7 +54,7 @@ ImageBufferData::ImageBufferData(const IntSize&)
72 -ImageBuffer::ImageBuffer(const IntSize& size, float /* resolutionScale */, ColorSpace, RenderingMode, DeferralMode, bool& success)
73 +ImageBuffer::ImageBuffer(const IntSize& size, float /* resolutionScale */, ColorSpace, RenderingMode renderingMode, DeferralMode, bool& success)
77 @@ -70,6 +70,12 @@ ImageBuffer::ImageBuffer(const IntSize& size, float /* resolutionScale */, Color
78 m_data.m_platformContext.setCr(cr.get());
79 m_context = adoptPtr(new GraphicsContext(&m_data.m_platformContext));
81 +#if ENABLE(ACCELERATED_2D_CANVAS)
82 + if (renderingMode == Accelerated)
83 + context()->platformContext()->setAccelerated(true);
85 + UNUSED_PARAM(renderingMode);
89 ImageBuffer::~ImageBuffer()
90 diff --git a/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp b/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp
91 index 865d152..92fd924 100644
92 --- a/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp
93 +++ b/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp
94 @@ -82,6 +82,7 @@ public:
96 PlatformContextCairo::PlatformContextCairo(cairo_t* cr)
98 + , m_accelerated(false)
100 m_stateStack.append(State());
101 m_state = &m_stateStack.last();
102 diff --git a/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.h b/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.h
103 index d7f1205..436407ae 100644
104 --- a/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.h
105 +++ b/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.h
106 @@ -67,6 +67,9 @@ public:
107 enum AlphaPreservation { DoNotPreserveAlpha, PreserveAlpha };
108 void prepareForStroking(const GraphicsContextState&, AlphaPreservation = PreserveAlpha);
110 + bool isAccelerated() const { return m_accelerated; }
111 + void setAccelerated(bool accelerated) { m_accelerated = accelerated; }
114 void clipForPatternFilling(const GraphicsContextState&);
116 @@ -79,6 +82,7 @@ private:
117 // GraphicsContext is responsible for managing the state of the ShadowBlur,
118 // so it does not need to be on the state stack.
119 ShadowBlur m_shadowBlur;
120 + bool m_accelerated;