diff options
Diffstat (limited to 'webkit/compositor_bindings')
36 files changed, 102 insertions, 103 deletions
diff --git a/webkit/compositor_bindings/CCThreadImpl.cpp b/webkit/compositor_bindings/CCThreadImpl.cpp index 6a58525..4e09658 100644 --- a/webkit/compositor_bindings/CCThreadImpl.cpp +++ b/webkit/compositor_bindings/CCThreadImpl.cpp @@ -9,8 +9,8 @@ #include <public/Platform.h> #include <public/WebThread.h> -using WebCore::CCThread; -using WebCore::CCCompletionEvent; +using cc::CCThread; +using cc::CCCompletionEvent; namespace WebKit { diff --git a/webkit/compositor_bindings/CCThreadImpl.h b/webkit/compositor_bindings/CCThreadImpl.h index 31b017e..b45acb3 100644 --- a/webkit/compositor_bindings/CCThreadImpl.h +++ b/webkit/compositor_bindings/CCThreadImpl.h @@ -15,17 +15,17 @@ namespace WebKit { class WebThread; // Implements CCThread in terms of WebThread. -class CCThreadImpl : public WebCore::CCThread { +class CCThreadImpl : public cc::CCThread { public: // Creates a CCThreadImpl wrapping the current thread. - static PassOwnPtr<WebCore::CCThread> createForCurrentThread(); + static PassOwnPtr<cc::CCThread> createForCurrentThread(); // Creates a CCThread wrapping a non-current WebThread. - static PassOwnPtr<WebCore::CCThread> createForDifferentThread(WebThread*); + static PassOwnPtr<cc::CCThread> createForDifferentThread(WebThread*); virtual ~CCThreadImpl(); - virtual void postTask(PassOwnPtr<WebCore::CCThread::Task>); - virtual void postDelayedTask(PassOwnPtr<WebCore::CCThread::Task>, long long delayMs); + virtual void postTask(PassOwnPtr<cc::CCThread::Task>); + virtual void postDelayedTask(PassOwnPtr<cc::CCThread::Task>, long long delayMs); base::PlatformThreadId threadID() const; private: diff --git a/webkit/compositor_bindings/LayerChromiumTest.cpp b/webkit/compositor_bindings/LayerChromiumTest.cpp index 59fc7ba..9f5401b 100644 --- a/webkit/compositor_bindings/LayerChromiumTest.cpp +++ b/webkit/compositor_bindings/LayerChromiumTest.cpp @@ -18,7 +18,7 @@ #include <gtest/gtest.h> #include <public/WebTransformationMatrix.h> -using namespace WebCore; +using namespace cc; using namespace WebKitTests; using WebKit::WebTransformationMatrix; using ::testing::Mock; diff --git a/webkit/compositor_bindings/TextureCopierTest.cpp b/webkit/compositor_bindings/TextureCopierTest.cpp index c2382d2..9b017ba 100644 --- a/webkit/compositor_bindings/TextureCopierTest.cpp +++ b/webkit/compositor_bindings/TextureCopierTest.cpp @@ -12,7 +12,7 @@ #include <gtest/gtest.h> #include <wtf/RefPtr.h> -using namespace WebCore; +using namespace cc; using namespace WebKit; using testing::InSequence; using testing::Test; diff --git a/webkit/compositor_bindings/TextureLayerChromiumTest.cpp b/webkit/compositor_bindings/TextureLayerChromiumTest.cpp index 947872d..0651fd9 100644 --- a/webkit/compositor_bindings/TextureLayerChromiumTest.cpp +++ b/webkit/compositor_bindings/TextureLayerChromiumTest.cpp @@ -12,7 +12,7 @@ #include <gmock/gmock.h> #include <gtest/gtest.h> -using namespace WebCore; +using namespace cc; using ::testing::Mock; using ::testing::_; using ::testing::AtLeast; diff --git a/webkit/compositor_bindings/ThrottledTextureUploaderTest.cpp b/webkit/compositor_bindings/ThrottledTextureUploaderTest.cpp index 86b7a10..ea5a3e3 100644 --- a/webkit/compositor_bindings/ThrottledTextureUploaderTest.cpp +++ b/webkit/compositor_bindings/ThrottledTextureUploaderTest.cpp @@ -14,7 +14,7 @@ #include <gtest/gtest.h> #include <wtf/RefPtr.h> -using namespace WebCore; +using namespace cc; using namespace WebKit; namespace { diff --git a/webkit/compositor_bindings/TiledLayerChromiumTest.cpp b/webkit/compositor_bindings/TiledLayerChromiumTest.cpp index 7a36566..3c7b964 100644 --- a/webkit/compositor_bindings/TiledLayerChromiumTest.cpp +++ b/webkit/compositor_bindings/TiledLayerChromiumTest.cpp @@ -21,7 +21,7 @@ #include <gtest/gtest.h> #include <public/WebTransformationMatrix.h> -using namespace WebCore; +using namespace cc; using namespace WebKitTests; using namespace WTF; using WebKit::WebTransformationMatrix; @@ -1471,7 +1471,7 @@ private: class UpdateTrackingTiledLayerChromium : public FakeTiledLayerChromium { public: - explicit UpdateTrackingTiledLayerChromium(WebCore::CCPrioritizedTextureManager* manager) + explicit UpdateTrackingTiledLayerChromium(CCPrioritizedTextureManager* manager) : FakeTiledLayerChromium(manager) { OwnPtr<TrackingLayerPainter> trackingLayerPainter(TrackingLayerPainter::create()); @@ -1483,7 +1483,7 @@ public: TrackingLayerPainter* trackingLayerPainter() const { return m_trackingLayerPainter; } protected: - virtual WebCore::LayerTextureUpdater* textureUpdater() const OVERRIDE { return m_layerTextureUpdater.get(); } + virtual LayerTextureUpdater* textureUpdater() const OVERRIDE { return m_layerTextureUpdater.get(); } private: TrackingLayerPainter* m_trackingLayerPainter; diff --git a/webkit/compositor_bindings/TreeSynchronizerTest.cpp b/webkit/compositor_bindings/TreeSynchronizerTest.cpp index 6268543..8d093d7 100644 --- a/webkit/compositor_bindings/TreeSynchronizerTest.cpp +++ b/webkit/compositor_bindings/TreeSynchronizerTest.cpp @@ -15,7 +15,7 @@ #include "Region.h" #include <gtest/gtest.h> -using namespace WebCore; +using namespace cc; using namespace WebKitTests; namespace { diff --git a/webkit/compositor_bindings/WebAnimationCurveCommon.cpp b/webkit/compositor_bindings/WebAnimationCurveCommon.cpp index 2e45dc5..d13750e 100644 --- a/webkit/compositor_bindings/WebAnimationCurveCommon.cpp +++ b/webkit/compositor_bindings/WebAnimationCurveCommon.cpp @@ -13,17 +13,17 @@ namespace WebKit { -PassOwnPtr<WebCore::CCTimingFunction> createTimingFunction(WebAnimationCurve::TimingFunctionType type) +PassOwnPtr<cc::CCTimingFunction> createTimingFunction(WebAnimationCurve::TimingFunctionType type) { switch (type) { case WebAnimationCurve::TimingFunctionTypeEase: - return WebCore::CCEaseTimingFunction::create(); + return cc::CCEaseTimingFunction::create(); case WebAnimationCurve::TimingFunctionTypeEaseIn: - return WebCore::CCEaseInTimingFunction::create(); + return cc::CCEaseInTimingFunction::create(); case WebAnimationCurve::TimingFunctionTypeEaseOut: - return WebCore::CCEaseOutTimingFunction::create(); + return cc::CCEaseOutTimingFunction::create(); case WebAnimationCurve::TimingFunctionTypeEaseInOut: - return WebCore::CCEaseInOutTimingFunction::create(); + return cc::CCEaseInOutTimingFunction::create(); case WebAnimationCurve::TimingFunctionTypeLinear: return nullptr; } diff --git a/webkit/compositor_bindings/WebAnimationCurveCommon.h b/webkit/compositor_bindings/WebAnimationCurveCommon.h index b911e82..2df8b5f 100644 --- a/webkit/compositor_bindings/WebAnimationCurveCommon.h +++ b/webkit/compositor_bindings/WebAnimationCurveCommon.h @@ -8,12 +8,12 @@ #include <public/WebAnimationCurve.h> #include <wtf/Forward.h> -namespace WebCore { +namespace cc { class CCTimingFunction; } namespace WebKit { -PassOwnPtr<WebCore::CCTimingFunction> createTimingFunction(WebAnimationCurve::TimingFunctionType); +PassOwnPtr<cc::CCTimingFunction> createTimingFunction(WebAnimationCurve::TimingFunctionType); } #endif // WebAnimationCurveCommon_h diff --git a/webkit/compositor_bindings/WebAnimationImpl.cpp b/webkit/compositor_bindings/WebAnimationImpl.cpp index bbae89b..b915082 100644 --- a/webkit/compositor_bindings/WebAnimationImpl.cpp +++ b/webkit/compositor_bindings/WebAnimationImpl.cpp @@ -15,7 +15,7 @@ #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> -using WebCore::CCActiveAnimation; +using cc::CCActiveAnimation; namespace WebKit { @@ -34,7 +34,7 @@ WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& webCurve, TargetProp groupId = nextGroupId++; WebAnimationCurve::AnimationCurveType curveType = webCurve.type(); - OwnPtr<WebCore::CCAnimationCurve> curve; + OwnPtr<cc::CCAnimationCurve> curve; switch (curveType) { case WebAnimationCurve::AnimationCurveTypeFloat: { const WebFloatAnimationCurveImpl* floatCurveImpl = static_cast<const WebFloatAnimationCurveImpl*>(&webCurve); @@ -47,7 +47,7 @@ WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& webCurve, TargetProp break; } } - m_animation = CCActiveAnimation::create(curve.release(), animationId, groupId, static_cast<WebCore::CCActiveAnimation::TargetProperty>(targetProperty)); + m_animation = CCActiveAnimation::create(curve.release(), animationId, groupId, static_cast<cc::CCActiveAnimation::TargetProperty>(targetProperty)); } WebAnimationImpl::~WebAnimationImpl() @@ -104,9 +104,9 @@ void WebAnimationImpl::setAlternatesDirection(bool alternates) m_animation->setAlternatesDirection(alternates); } -PassOwnPtr<WebCore::CCActiveAnimation> WebAnimationImpl::cloneToCCAnimation() +PassOwnPtr<cc::CCActiveAnimation> WebAnimationImpl::cloneToCCAnimation() { - OwnPtr<WebCore::CCActiveAnimation> toReturn(m_animation->clone(WebCore::CCActiveAnimation::NonControllingInstance)); + OwnPtr<cc::CCActiveAnimation> toReturn(m_animation->clone(cc::CCActiveAnimation::NonControllingInstance)); toReturn->setNeedsSynchronizedStartTime(true); return toReturn.release(); } diff --git a/webkit/compositor_bindings/WebAnimationImpl.h b/webkit/compositor_bindings/WebAnimationImpl.h index e549650..a4abfc9 100644 --- a/webkit/compositor_bindings/WebAnimationImpl.h +++ b/webkit/compositor_bindings/WebAnimationImpl.h @@ -9,7 +9,7 @@ #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> -namespace WebCore { +namespace cc { class CCActiveAnimation; } @@ -32,12 +32,11 @@ public: virtual bool alternatesDirection() const OVERRIDE; virtual void setAlternatesDirection(bool) OVERRIDE; - PassOwnPtr<WebCore::CCActiveAnimation> cloneToCCAnimation(); + PassOwnPtr<cc::CCActiveAnimation> cloneToCCAnimation(); private: - OwnPtr<WebCore::CCActiveAnimation> m_animation; + OwnPtr<cc::CCActiveAnimation> m_animation; }; } #endif // WebAnimationImpl_h - diff --git a/webkit/compositor_bindings/WebCompositorImpl.cpp b/webkit/compositor_bindings/WebCompositorImpl.cpp index 5086837..270e90a 100644 --- a/webkit/compositor_bindings/WebCompositorImpl.cpp +++ b/webkit/compositor_bindings/WebCompositorImpl.cpp @@ -21,7 +21,7 @@ #include "webkit/glue/webthread_impl.h" #endif -using namespace WebCore; +using namespace cc; namespace WebKit { diff --git a/webkit/compositor_bindings/WebCompositorImpl.h b/webkit/compositor_bindings/WebCompositorImpl.h index 68ae94a..c117a89 100644 --- a/webkit/compositor_bindings/WebCompositorImpl.h +++ b/webkit/compositor_bindings/WebCompositorImpl.h @@ -11,7 +11,7 @@ #include <wtf/Noncopyable.h> #include <wtf/OwnPtr.h> -namespace WebCore { +namespace cc { class CCThread; } @@ -30,8 +30,8 @@ public: private: static bool s_initialized; - static WebCore::CCThread* s_mainThread; - static WebCore::CCThread* s_implThread; + static cc::CCThread* s_mainThread; + static cc::CCThread* s_implThread; }; } diff --git a/webkit/compositor_bindings/WebContentLayerImpl.cpp b/webkit/compositor_bindings/WebContentLayerImpl.cpp index a1f88fd..61d5998 100644 --- a/webkit/compositor_bindings/WebContentLayerImpl.cpp +++ b/webkit/compositor_bindings/WebContentLayerImpl.cpp @@ -6,6 +6,8 @@ #include "WebContentLayerImpl.h" #include "ContentLayerChromium.h" +#include "FloatRect.h" +#include "IntRect.h" #include "SkMatrix44.h" #include "webcore_convert.h" #include <public/WebContentLayerClient.h> @@ -14,7 +16,7 @@ #include <public/WebRect.h> #include <public/WebSize.h> -using namespace WebCore; +using namespace cc; namespace WebKit { diff --git a/webkit/compositor_bindings/WebContentLayerImpl.h b/webkit/compositor_bindings/WebContentLayerImpl.h index aee3906..0eb1a81 100644 --- a/webkit/compositor_bindings/WebContentLayerImpl.h +++ b/webkit/compositor_bindings/WebContentLayerImpl.h @@ -10,11 +10,16 @@ #include <public/WebContentLayer.h> #include <wtf/OwnPtr.h> +namespace cc { +class IntRect; +class FloatRect; +} + namespace WebKit { class WebContentLayerClient; class WebContentLayerImpl : public WebContentLayer, - public WebCore::ContentLayerChromiumClient { + public cc::ContentLayerChromiumClient { public: explicit WebContentLayerImpl(WebContentLayerClient*); @@ -30,7 +35,7 @@ protected: virtual ~WebContentLayerImpl(); // ContentLayerChromiumClient implementation. - virtual void paintContents(SkCanvas*, const WebCore::IntRect& clip, WebCore::FloatRect& opaque) OVERRIDE; + virtual void paintContents(SkCanvas*, const cc::IntRect& clip, cc::FloatRect& opaque) OVERRIDE; OwnPtr<WebLayerImpl> m_layer; WebContentLayerClient* m_client; diff --git a/webkit/compositor_bindings/WebExternalTextureLayerImpl.cpp b/webkit/compositor_bindings/WebExternalTextureLayerImpl.cpp index b620e25..302ce5b 100644 --- a/webkit/compositor_bindings/WebExternalTextureLayerImpl.cpp +++ b/webkit/compositor_bindings/WebExternalTextureLayerImpl.cpp @@ -13,7 +13,7 @@ #include <public/WebFloatRect.h> #include <public/WebSize.h> -using namespace WebCore; +using namespace cc; namespace WebKit { diff --git a/webkit/compositor_bindings/WebExternalTextureLayerImpl.h b/webkit/compositor_bindings/WebExternalTextureLayerImpl.h index 311f4ec..542a650 100644 --- a/webkit/compositor_bindings/WebExternalTextureLayerImpl.h +++ b/webkit/compositor_bindings/WebExternalTextureLayerImpl.h @@ -14,7 +14,7 @@ namespace WebKit { class WebLayerImpl; class WebExternalTextureLayerImpl : public WebExternalTextureLayer, - public WebCore::TextureLayerChromiumClient { + public cc::TextureLayerChromiumClient { public: explicit WebExternalTextureLayerImpl(WebExternalTextureLayerClient*); virtual ~WebExternalTextureLayerImpl(); @@ -30,7 +30,7 @@ public: virtual void setRateLimitContext(bool) OVERRIDE; // TextureLayerChromiumClient implementation. - virtual unsigned prepareTexture(WebCore::CCTextureUpdateQueue&) OVERRIDE; + virtual unsigned prepareTexture(cc::CCTextureUpdateQueue&) OVERRIDE; virtual WebGraphicsContext3D* context() OVERRIDE; private: @@ -41,4 +41,3 @@ private: } #endif // WebExternalTextureLayerImpl_h - diff --git a/webkit/compositor_bindings/WebFloatAnimationCurveImpl.cpp b/webkit/compositor_bindings/WebFloatAnimationCurveImpl.cpp index cc1ad35..15351e1 100644 --- a/webkit/compositor_bindings/WebFloatAnimationCurveImpl.cpp +++ b/webkit/compositor_bindings/WebFloatAnimationCurveImpl.cpp @@ -21,7 +21,7 @@ WebFloatAnimationCurve* WebFloatAnimationCurve::create() } WebFloatAnimationCurveImpl::WebFloatAnimationCurveImpl() - : m_curve(WebCore::CCKeyframedFloatAnimationCurve::create()) + : m_curve(cc::CCKeyframedFloatAnimationCurve::create()) { } @@ -41,12 +41,12 @@ void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe) void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe, TimingFunctionType type) { - m_curve->addKeyframe(WebCore::CCFloatKeyframe::create(keyframe.time, keyframe.value, createTimingFunction(type))); + m_curve->addKeyframe(cc::CCFloatKeyframe::create(keyframe.time, keyframe.value, createTimingFunction(type))); } void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe, double x1, double y1, double x2, double y2) { - m_curve->addKeyframe(WebCore::CCFloatKeyframe::create(keyframe.time, keyframe.value, WebCore::CCCubicBezierTimingFunction::create(x1, y1, x2, y2))); + m_curve->addKeyframe(cc::CCFloatKeyframe::create(keyframe.time, keyframe.value, cc::CCCubicBezierTimingFunction::create(x1, y1, x2, y2))); } float WebFloatAnimationCurveImpl::getValue(double time) const @@ -54,7 +54,7 @@ float WebFloatAnimationCurveImpl::getValue(double time) const return m_curve->getValue(time); } -PassOwnPtr<WebCore::CCAnimationCurve> WebFloatAnimationCurveImpl::cloneToCCAnimationCurve() const +PassOwnPtr<cc::CCAnimationCurve> WebFloatAnimationCurveImpl::cloneToCCAnimationCurve() const { return m_curve->clone(); } diff --git a/webkit/compositor_bindings/WebFloatAnimationCurveImpl.h b/webkit/compositor_bindings/WebFloatAnimationCurveImpl.h index 04c3c9a..be6d80c 100644 --- a/webkit/compositor_bindings/WebFloatAnimationCurveImpl.h +++ b/webkit/compositor_bindings/WebFloatAnimationCurveImpl.h @@ -9,7 +9,7 @@ #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> -namespace WebCore { +namespace cc { class CCAnimationCurve; class CCKeyframedFloatAnimationCurve; } @@ -31,10 +31,10 @@ public: virtual float getValue(double time) const OVERRIDE; - PassOwnPtr<WebCore::CCAnimationCurve> cloneToCCAnimationCurve() const; + PassOwnPtr<cc::CCAnimationCurve> cloneToCCAnimationCurve() const; private: - OwnPtr<WebCore::CCKeyframedFloatAnimationCurve> m_curve; + OwnPtr<cc::CCKeyframedFloatAnimationCurve> m_curve; }; } diff --git a/webkit/compositor_bindings/WebFloatAnimationCurveTest.cpp b/webkit/compositor_bindings/WebFloatAnimationCurveTest.cpp index b587e09..c358886e 100644 --- a/webkit/compositor_bindings/WebFloatAnimationCurveTest.cpp +++ b/webkit/compositor_bindings/WebFloatAnimationCurveTest.cpp @@ -119,7 +119,7 @@ TEST(WebFloatAnimationCurveTest, EaseTimingFunction) curve->add(WebFloatKeyframe(0, 0), WebAnimationCurve::TimingFunctionTypeEase); curve->add(WebFloatKeyframe(1, 1), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time)); @@ -146,7 +146,7 @@ TEST(WebFloatAnimationCurveTest, EaseInTimingFunction) curve->add(WebFloatKeyframe(0, 0), WebAnimationCurve::TimingFunctionTypeEaseIn); curve->add(WebFloatKeyframe(1, 1), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseInTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseInTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time)); @@ -160,7 +160,7 @@ TEST(WebFloatAnimationCurveTest, EaseOutTimingFunction) curve->add(WebFloatKeyframe(0, 0), WebAnimationCurve::TimingFunctionTypeEaseOut); curve->add(WebFloatKeyframe(1, 1), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseOutTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseOutTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time)); @@ -174,7 +174,7 @@ TEST(WebFloatAnimationCurveTest, EaseInOutTimingFunction) curve->add(WebFloatKeyframe(0, 0), WebAnimationCurve::TimingFunctionTypeEaseInOut); curve->add(WebFloatKeyframe(1, 1), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseInOutTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseInOutTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time)); @@ -192,7 +192,7 @@ TEST(WebFloatAnimationCurveTest, CustomBezierTimingFunction) curve->add(WebFloatKeyframe(0, 0), x1, y1, x2, y2); curve->add(WebFloatKeyframe(1, 1), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCCubicBezierTimingFunction::create(x1, y1, x2, y2)); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCCubicBezierTimingFunction::create(x1, y1, x2, y2)); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time)); @@ -206,7 +206,7 @@ TEST(WebFloatAnimationCurveTest, DefaultTimingFunction) curve->add(WebFloatKeyframe(0, 0)); curve->add(WebFloatKeyframe(1, 1), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time)); diff --git a/webkit/compositor_bindings/WebIOSurfaceLayerImpl.cpp b/webkit/compositor_bindings/WebIOSurfaceLayerImpl.cpp index ed3b99a..5a27036 100644 --- a/webkit/compositor_bindings/WebIOSurfaceLayerImpl.cpp +++ b/webkit/compositor_bindings/WebIOSurfaceLayerImpl.cpp @@ -9,7 +9,7 @@ #include "WebLayerImpl.h" #include "webcore_convert.h" -using WebCore::IOSurfaceLayerChromium; +using cc::IOSurfaceLayerChromium; namespace WebKit { diff --git a/webkit/compositor_bindings/WebImageLayerImpl.cpp b/webkit/compositor_bindings/WebImageLayerImpl.cpp index bb1b56b..06717e0 100644 --- a/webkit/compositor_bindings/WebImageLayerImpl.cpp +++ b/webkit/compositor_bindings/WebImageLayerImpl.cpp @@ -8,7 +8,7 @@ #include "ImageLayerChromium.h" #include "WebLayerImpl.h" -using WebCore::ImageLayerChromium; +using cc::ImageLayerChromium; namespace WebKit { diff --git a/webkit/compositor_bindings/WebImageLayerImpl.h b/webkit/compositor_bindings/WebImageLayerImpl.h index 242edf4..6478923 100644 --- a/webkit/compositor_bindings/WebImageLayerImpl.h +++ b/webkit/compositor_bindings/WebImageLayerImpl.h @@ -8,10 +8,6 @@ #include <public/WebImageLayer.h> #include <wtf/OwnPtr.h> -namespace WebCore { -class ImageLayerChromium; -} - namespace WebKit { class WebLayerImpl; diff --git a/webkit/compositor_bindings/WebLayerImpl.cpp b/webkit/compositor_bindings/WebLayerImpl.cpp index df3f430..0d86f19 100644 --- a/webkit/compositor_bindings/WebLayerImpl.cpp +++ b/webkit/compositor_bindings/WebLayerImpl.cpp @@ -19,8 +19,8 @@ #include <public/WebSize.h> #include <public/WebTransformationMatrix.h> -using WebCore::CCActiveAnimation; -using WebCore::LayerChromium; +using cc::CCActiveAnimation; +using cc::LayerChromium; namespace WebKit { diff --git a/webkit/compositor_bindings/WebLayerImpl.h b/webkit/compositor_bindings/WebLayerImpl.h index b34d43b..e6bcefe 100644 --- a/webkit/compositor_bindings/WebLayerImpl.h +++ b/webkit/compositor_bindings/WebLayerImpl.h @@ -9,7 +9,7 @@ #include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> -namespace WebCore { +namespace cc { class LayerChromium; } @@ -18,7 +18,7 @@ namespace WebKit { class WebLayerImpl : public WebLayer { public: WebLayerImpl(); - explicit WebLayerImpl(PassRefPtr<WebCore::LayerChromium>); + explicit WebLayerImpl(PassRefPtr<cc::LayerChromium>); virtual ~WebLayerImpl(); // WebLayer implementation. @@ -83,10 +83,10 @@ public: virtual void setFixedToContainerLayer(bool) OVERRIDE; virtual void setScrollClient(WebLayerScrollClient*) OVERRIDE; - WebCore::LayerChromium* layer() const; + cc::LayerChromium* layer() const; protected: - RefPtr<WebCore::LayerChromium> m_layer; + RefPtr<cc::LayerChromium> m_layer; }; } // namespace WebKit diff --git a/webkit/compositor_bindings/WebLayerTreeViewImpl.cpp b/webkit/compositor_bindings/WebLayerTreeViewImpl.cpp index 237d9f3..ceae7da 100644 --- a/webkit/compositor_bindings/WebLayerTreeViewImpl.cpp +++ b/webkit/compositor_bindings/WebLayerTreeViewImpl.cpp @@ -20,7 +20,7 @@ #include <public/WebRenderingStats.h> #include <public/WebSize.h> -using namespace WebCore; +using namespace cc; namespace WebKit { @@ -211,7 +211,7 @@ void WebLayerTreeViewImpl::layout() m_client->layout(); } -void WebLayerTreeViewImpl::applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) +void WebLayerTreeViewImpl::applyScrollAndScale(const cc::IntSize& scrollDelta, float pageScale) { m_client->applyScrollAndScale(convert(scrollDelta), pageScale); } diff --git a/webkit/compositor_bindings/WebLayerTreeViewImpl.h b/webkit/compositor_bindings/WebLayerTreeViewImpl.h index e795f5a..3dbeb20 100644 --- a/webkit/compositor_bindings/WebLayerTreeViewImpl.h +++ b/webkit/compositor_bindings/WebLayerTreeViewImpl.h @@ -10,7 +10,7 @@ #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> -namespace WebCore { +namespace cc { class CCLayerTreeHost; } @@ -19,7 +19,7 @@ class WebLayer; class WebLayerTreeViewClient; class WebLayerTreeViewClientAdapter; -class WebLayerTreeViewImpl : public WebLayerTreeView, public WebCore::CCLayerTreeHostClient { +class WebLayerTreeViewImpl : public WebLayerTreeView, public cc::CCLayerTreeHostClient { public: explicit WebLayerTreeViewImpl(WebLayerTreeViewClient*); virtual ~WebLayerTreeViewImpl(); @@ -51,15 +51,15 @@ public: virtual void setFontAtlas(SkBitmap, WebRect asciiToRectTable[128], int fontHeight) OVERRIDE; virtual void loseCompositorContext(int numTimes) OVERRIDE; - // WebCore::CCLayerTreeHostClient implementation. + // cc::CCLayerTreeHostClient implementation. virtual void willBeginFrame() OVERRIDE; virtual void didBeginFrame() OVERRIDE; virtual void animate(double monotonicFrameBeginTime) OVERRIDE; virtual void layout() OVERRIDE; - virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) OVERRIDE; + virtual void applyScrollAndScale(const cc::IntSize& scrollDelta, float pageScale) OVERRIDE; virtual PassOwnPtr<WebCompositorOutputSurface> createOutputSurface() OVERRIDE; virtual void didRecreateOutputSurface(bool success) OVERRIDE; - virtual PassOwnPtr<WebCore::CCInputHandler> createInputHandler() OVERRIDE; + virtual PassOwnPtr<cc::CCInputHandler> createInputHandler() OVERRIDE; virtual void willCommit() OVERRIDE; virtual void didCommit() OVERRIDE; virtual void didCommitAndDrawFrame() OVERRIDE; @@ -68,7 +68,7 @@ public: private: WebLayerTreeViewClient* m_client; - OwnPtr<WebCore::CCLayerTreeHost> m_layerTreeHost; + OwnPtr<cc::CCLayerTreeHost> m_layerTreeHost; }; } // namespace WebKit diff --git a/webkit/compositor_bindings/WebScrollbarLayerImpl.cpp b/webkit/compositor_bindings/WebScrollbarLayerImpl.cpp index 6aa6978..f216de3 100644 --- a/webkit/compositor_bindings/WebScrollbarLayerImpl.cpp +++ b/webkit/compositor_bindings/WebScrollbarLayerImpl.cpp @@ -8,7 +8,7 @@ #include "ScrollbarLayerChromium.h" #include "WebLayerImpl.h" -using WebCore::ScrollbarLayerChromium; +using cc::ScrollbarLayerChromium; namespace WebKit { diff --git a/webkit/compositor_bindings/WebSolidColorLayerImpl.cpp b/webkit/compositor_bindings/WebSolidColorLayerImpl.cpp index ff4cf4e..b5e90ff 100644 --- a/webkit/compositor_bindings/WebSolidColorLayerImpl.cpp +++ b/webkit/compositor_bindings/WebSolidColorLayerImpl.cpp @@ -8,7 +8,7 @@ #include "SolidColorLayerChromium.h" #include "WebLayerImpl.h" -using WebCore::SolidColorLayerChromium; +using cc::SolidColorLayerChromium; namespace WebKit { @@ -38,4 +38,3 @@ void WebSolidColorLayerImpl::setBackgroundColor(WebColor color) } } // namespace WebKit - diff --git a/webkit/compositor_bindings/WebToCCInputHandlerAdapter.cpp b/webkit/compositor_bindings/WebToCCInputHandlerAdapter.cpp index 895fee5..89fb5ca 100644 --- a/webkit/compositor_bindings/WebToCCInputHandlerAdapter.cpp +++ b/webkit/compositor_bindings/WebToCCInputHandlerAdapter.cpp @@ -11,8 +11,8 @@ #include "webcore_convert.h" #include <public/WebInputHandlerClient.h> -#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \ - COMPILE_ASSERT(int(WebKit::webkit_name) == int(WebCore::webcore_name), mismatching_enums) +#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \ + COMPILE_ASSERT(int(WebKit::webkit_name) == int(cc::cc_name), mismatching_enums) COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusOnMainThread, CCInputHandlerClient::ScrollOnMainThread); COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusStarted, CCInputHandlerClient::ScrollStarted); @@ -38,7 +38,7 @@ WebToCCInputHandlerAdapter::~WebToCCInputHandlerAdapter() class WebToCCInputHandlerAdapter::ClientAdapter : public WebInputHandlerClient { public: - ClientAdapter(WebCore::CCInputHandlerClient* client) + ClientAdapter(cc::CCInputHandlerClient* client) : m_client(client) { } @@ -49,7 +49,7 @@ public: virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType type) OVERRIDE { - return static_cast<WebInputHandlerClient::ScrollStatus>(m_client->scrollBegin(convert(point), static_cast<WebCore::CCInputHandlerClient::ScrollInputType>(type))); + return static_cast<WebInputHandlerClient::ScrollStatus>(m_client->scrollBegin(convert(point), static_cast<cc::CCInputHandlerClient::ScrollInputType>(type))); } virtual void scrollBy(WebPoint point, WebSize offset) OVERRIDE @@ -92,11 +92,11 @@ public: } private: - WebCore::CCInputHandlerClient* m_client; + cc::CCInputHandlerClient* m_client; }; -void WebToCCInputHandlerAdapter::bindToClient(WebCore::CCInputHandlerClient* client) +void WebToCCInputHandlerAdapter::bindToClient(cc::CCInputHandlerClient* client) { m_clientAdapter = adoptPtr(new ClientAdapter(client)); m_handler->bindToClient(m_clientAdapter.get()); @@ -108,4 +108,3 @@ void WebToCCInputHandlerAdapter::animate(double monotonicTime) } } - diff --git a/webkit/compositor_bindings/WebToCCInputHandlerAdapter.h b/webkit/compositor_bindings/WebToCCInputHandlerAdapter.h index 0984e84..d04d34b 100644 --- a/webkit/compositor_bindings/WebToCCInputHandlerAdapter.h +++ b/webkit/compositor_bindings/WebToCCInputHandlerAdapter.h @@ -12,13 +12,13 @@ namespace WebKit { -class WebToCCInputHandlerAdapter : public WebCore::CCInputHandler { +class WebToCCInputHandlerAdapter : public cc::CCInputHandler { public: static PassOwnPtr<WebToCCInputHandlerAdapter> create(PassOwnPtr<WebInputHandler>); - virtual ~WebToCCInputHandlerAdapter(); + virtual ~WebToCCInputHandlerAdapter(); - // WebCore::CCInputHandler implementation. - virtual void bindToClient(WebCore::CCInputHandlerClient*) OVERRIDE; + // cc::CCInputHandler implementation. + virtual void bindToClient(cc::CCInputHandlerClient*) OVERRIDE; virtual void animate(double monotonicTime) OVERRIDE; private: diff --git a/webkit/compositor_bindings/WebTransformAnimationCurveImpl.cpp b/webkit/compositor_bindings/WebTransformAnimationCurveImpl.cpp index 2cdf000..dae0bd1 100644 --- a/webkit/compositor_bindings/WebTransformAnimationCurveImpl.cpp +++ b/webkit/compositor_bindings/WebTransformAnimationCurveImpl.cpp @@ -20,7 +20,7 @@ WebTransformAnimationCurve* WebTransformAnimationCurve::create() } WebTransformAnimationCurveImpl::WebTransformAnimationCurveImpl() - : m_curve(WebCore::CCKeyframedTransformAnimationCurve::create()) + : m_curve(cc::CCKeyframedTransformAnimationCurve::create()) { } @@ -40,12 +40,12 @@ void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe) void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, TimingFunctionType type) { - m_curve->addKeyframe(WebCore::CCTransformKeyframe::create(keyframe.time, keyframe.value, createTimingFunction(type))); + m_curve->addKeyframe(cc::CCTransformKeyframe::create(keyframe.time, keyframe.value, createTimingFunction(type))); } void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, double x1, double y1, double x2, double y2) { - m_curve->addKeyframe(WebCore::CCTransformKeyframe::create(keyframe.time, keyframe.value, WebCore::CCCubicBezierTimingFunction::create(x1, y1, x2, y2))); + m_curve->addKeyframe(cc::CCTransformKeyframe::create(keyframe.time, keyframe.value, cc::CCCubicBezierTimingFunction::create(x1, y1, x2, y2))); } WebTransformationMatrix WebTransformAnimationCurveImpl::getValue(double time) const @@ -53,7 +53,7 @@ WebTransformationMatrix WebTransformAnimationCurveImpl::getValue(double time) co return m_curve->getValue(time); } -PassOwnPtr<WebCore::CCAnimationCurve> WebTransformAnimationCurveImpl::cloneToCCAnimationCurve() const +PassOwnPtr<cc::CCAnimationCurve> WebTransformAnimationCurveImpl::cloneToCCAnimationCurve() const { return m_curve->clone(); } diff --git a/webkit/compositor_bindings/WebTransformAnimationCurveImpl.h b/webkit/compositor_bindings/WebTransformAnimationCurveImpl.h index b7d7018..8631ef9 100644 --- a/webkit/compositor_bindings/WebTransformAnimationCurveImpl.h +++ b/webkit/compositor_bindings/WebTransformAnimationCurveImpl.h @@ -9,7 +9,7 @@ #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> -namespace WebCore { +namespace cc { class CCAnimationCurve; class CCKeyframedTransformAnimationCurve; } @@ -31,10 +31,10 @@ public: virtual WebTransformationMatrix getValue(double time) const OVERRIDE; - PassOwnPtr<WebCore::CCAnimationCurve> cloneToCCAnimationCurve() const; + PassOwnPtr<cc::CCAnimationCurve> cloneToCCAnimationCurve() const; private: - OwnPtr<WebCore::CCKeyframedTransformAnimationCurve> m_curve; + OwnPtr<cc::CCKeyframedTransformAnimationCurve> m_curve; }; } diff --git a/webkit/compositor_bindings/WebTransformAnimationCurveTest.cpp b/webkit/compositor_bindings/WebTransformAnimationCurveTest.cpp index ee86d61..09021c7 100644 --- a/webkit/compositor_bindings/WebTransformAnimationCurveTest.cpp +++ b/webkit/compositor_bindings/WebTransformAnimationCurveTest.cpp @@ -156,7 +156,7 @@ TEST(WebTransformAnimationCurveTest, EaseTimingFunction) curve->add(WebTransformKeyframe(0, operations1), WebAnimationCurve::TimingFunctionTypeEase); curve->add(WebTransformKeyframe(1, operations2), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time).m41()); @@ -191,7 +191,7 @@ TEST(WebTransformAnimationCurveTest, EaseInTimingFunction) curve->add(WebTransformKeyframe(0, operations1), WebAnimationCurve::TimingFunctionTypeEaseIn); curve->add(WebTransformKeyframe(1, operations2), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseInTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseInTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time).m41()); @@ -209,7 +209,7 @@ TEST(WebTransformAnimationCurveTest, EaseOutTimingFunction) curve->add(WebTransformKeyframe(0, operations1), WebAnimationCurve::TimingFunctionTypeEaseOut); curve->add(WebTransformKeyframe(1, operations2), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseOutTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseOutTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time).m41()); @@ -227,7 +227,7 @@ TEST(WebTransformAnimationCurveTest, EaseInOutTimingFunction) curve->add(WebTransformKeyframe(0, operations1), WebAnimationCurve::TimingFunctionTypeEaseInOut); curve->add(WebTransformKeyframe(1, operations2), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseInOutTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseInOutTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time).m41()); @@ -249,7 +249,7 @@ TEST(WebTransformAnimationCurveTest, CustomBezierTimingFunction) curve->add(WebTransformKeyframe(0, operations1), x1, y1, x2, y2); curve->add(WebTransformKeyframe(1, operations2), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCCubicBezierTimingFunction::create(x1, y1, x2, y2)); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCCubicBezierTimingFunction::create(x1, y1, x2, y2)); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time).m41()); @@ -267,7 +267,7 @@ TEST(WebTransformAnimationCurveTest, DefaultTimingFunction) curve->add(WebTransformKeyframe(0, operations1)); curve->add(WebTransformKeyframe(1, operations2), WebAnimationCurve::TimingFunctionTypeLinear); - OwnPtr<WebCore::CCTimingFunction> timingFunction(WebCore::CCEaseTimingFunction::create()); + OwnPtr<cc::CCTimingFunction> timingFunction(cc::CCEaseTimingFunction::create()); for (int i = 0; i <= 4; ++i) { const double time = i * 0.25; EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time).m41()); diff --git a/webkit/compositor_bindings/WebVideoLayerImpl.cpp b/webkit/compositor_bindings/WebVideoLayerImpl.cpp index b1f6751..7241706 100644 --- a/webkit/compositor_bindings/WebVideoLayerImpl.cpp +++ b/webkit/compositor_bindings/WebVideoLayerImpl.cpp @@ -16,7 +16,7 @@ WebVideoLayer* WebVideoLayer::create(WebVideoFrameProvider* provider) } WebVideoLayerImpl::WebVideoLayerImpl(WebVideoFrameProvider* provider) - : m_layer(adoptPtr(new WebLayerImpl(WebCore::VideoLayerChromium::create(provider)))) + : m_layer(adoptPtr(new WebLayerImpl(cc::VideoLayerChromium::create(provider)))) { } |