0

Change cc files from namespace WebCore to cc

These files no longer are part of WebCore, so it doesn't make any sense to keep
that namespace.

Due to being unable to forward declare typedefs in C++, the stubs files (like
FloatSize) now define cc::FloatSize as being derived from WebCore::FloatSize.
With enough constructors, this lets them be used interchangably in the short
term until those geometry classes become real and not dependent on WebCore
files. This allows (nearly) all the forward declarations and uses of these
types in cc stay as-is with minimal churn.

BUG=none

Review URL: https://codereview.chromium.org/10914268

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156905 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
enne@chromium.org
2012-09-14 22:21:30 +00:00
parent 9a9805d494
commit 9c88e56156
301 changed files with 988 additions and 605 deletions
cc
BitmapCanvasLayerTextureUpdater.cppBitmapCanvasLayerTextureUpdater.hBitmapSkPictureCanvasLayerTextureUpdater.cppBitmapSkPictureCanvasLayerTextureUpdater.hCCActiveAnimation.cppCCActiveAnimation.hCCActiveAnimationTest.cppCCAnimationCurve.cppCCAnimationCurve.hCCAnimationEvents.hCCAppendQuadsData.hCCCheckerboardDrawQuad.cppCCCheckerboardDrawQuad.hCCCompletionEvent.hCCDamageTracker.cppCCDamageTracker.hCCDamageTrackerTest.cppCCDebugBorderDrawQuad.cppCCDebugBorderDrawQuad.hCCDebugRectHistory.cppCCDebugRectHistory.hCCDelayBasedTimeSource.cppCCDelayBasedTimeSource.hCCDelayBasedTimeSourceTest.cppCCDirectRenderer.cppCCDirectRenderer.hCCDrawQuad.cppCCDrawQuad.hCCFontAtlas.cppCCFontAtlas.hCCFrameRateController.cppCCFrameRateController.hCCFrameRateControllerTest.cppCCFrameRateCounter.cppCCFrameRateCounter.hCCGraphicsContext.hCCHeadsUpDisplayLayerImpl.cppCCHeadsUpDisplayLayerImpl.hCCHeadsUpDisplayTest.cppCCIOSurfaceDrawQuad.cppCCIOSurfaceDrawQuad.hCCIOSurfaceLayerImpl.cppCCIOSurfaceLayerImpl.hCCInputHandler.hCCKeyframedAnimationCurve.cppCCKeyframedAnimationCurve.hCCKeyframedAnimationCurveTest.cppCCLayerAnimationController.cppCCLayerAnimationController.hCCLayerAnimationControllerTest.cppCCLayerImpl.cppCCLayerImpl.hCCLayerImplTest.cppCCLayerIterator.cppCCLayerIterator.hCCLayerIteratorTest.cppCCLayerQuad.cppCCLayerQuad.hCCLayerQuadTest.cppCCLayerSorter.cppCCLayerSorter.hCCLayerSorterTest.cppCCLayerTilingData.cppCCLayerTilingData.hCCLayerTreeHost.cppCCLayerTreeHost.hCCLayerTreeHostClient.hCCLayerTreeHostCommon.cppCCLayerTreeHostCommon.hCCLayerTreeHostCommonTest.cppCCLayerTreeHostImpl.cppCCLayerTreeHostImpl.hCCLayerTreeHostImplTest.cppCCLayerTreeHostTest.cppCCMathUtil.cppCCMathUtil.hCCMathUtilTest.cppCCOcclusionTracker.cppCCOcclusionTracker.hCCOcclusionTrackerTest.cppCCOverdrawMetrics.cppCCOverdrawMetrics.hCCPageScaleAnimation.cppCCPageScaleAnimation.hCCPrioritizedTexture.cppCCPrioritizedTexture.hCCPrioritizedTextureManager.cppCCPrioritizedTextureManager.hCCPrioritizedTextureTest.cppCCPriorityCalculator.cppCCPriorityCalculator.hCCProxy.cppCCProxy.hCCQuadCuller.cppCCQuadCuller.hCCQuadCullerTest.cppCCQuadSink.hCCRenderPass.cppCCRenderPass.hCCRenderPassDrawQuad.cppCCRenderPassDrawQuad.hCCRenderPassSink.hCCRenderSurface.cppCCRenderSurface.hCCRenderSurfaceFilters.cppCCRenderSurfaceFilters.hCCRenderSurfaceFiltersTest.cppCCRenderSurfaceTest.cppCCRenderer.hCCRendererGL.cppCCRendererGL.hCCRenderingStats.hCCResourceProvider.cppCCResourceProvider.hCCResourceProviderTest.cppCCScheduler.cppCCScheduler.hCCSchedulerStateMachine.cppCCSchedulerStateMachine.hCCSchedulerStateMachineTest.cppCCSchedulerTest.cppCCScopedTexture.cppCCScopedTexture.hCCScopedTextureTest.cppCCScopedThreadProxy.hCCScrollbarAnimationController.cppCCScrollbarAnimationController.hCCScrollbarAnimationControllerLinearFade.cppCCScrollbarAnimationControllerLinearFade.hCCScrollbarAnimationControllerLinearFadeTest.cppCCScrollbarGeometryFixedThumb.cppCCScrollbarGeometryFixedThumb.hCCScrollbarGeometryStub.cppCCScrollbarGeometryStub.hCCScrollbarLayerImpl.cppCCScrollbarLayerImpl.hCCSettings.cppCCSettings.hCCSharedQuadState.cppCCSharedQuadState.hCCSingleThreadProxy.cppCCSingleThreadProxy.hCCSolidColorDrawQuad.cppCCSolidColorDrawQuad.hCCSolidColorLayerImpl.cppCCSolidColorLayerImpl.hCCSolidColorLayerImplTest.cppCCStreamVideoDrawQuad.cppCCStreamVideoDrawQuad.hCCTexture.cppCCTexture.hCCTextureDrawQuad.cppCCTextureDrawQuad.hCCTextureLayerImpl.cppCCTextureLayerImpl.hCCTextureUpdateController.cppCCTextureUpdateController.hCCTextureUpdateControllerTest.cppCCTextureUpdateQueue.cppCCTextureUpdateQueue.hCCThread.hCCThreadProxy.cppCCThreadProxy.hCCThreadTask.hCCThreadTaskTest.cppCCThreadedTest.cppCCThreadedTest.hCCTileDrawQuad.cppCCTileDrawQuad.hCCTiledLayerImpl.cppCCTiledLayerImpl.hCCTiledLayerImplTest.cppCCTimeSource.hCCTimer.cppCCTimer.hCCTimerTest.cppCCTimingFunction.cppCCTimingFunction.hCCVideoLayerImpl.cppCCVideoLayerImpl.hCCYUVVideoDrawQuad.cppCCYUVVideoDrawQuad.hCanvasLayerTextureUpdater.cppCanvasLayerTextureUpdater.hContentLayerChromium.cppContentLayerChromium.hContentLayerChromiumClient.hDEPSFloatQuadTest.cppFrameBufferSkPictureCanvasLayerTextureUpdater.cppFrameBufferSkPictureCanvasLayerTextureUpdater.hGeometryBinding.cppGeometryBinding.hHeadsUpDisplayLayerChromium.cppHeadsUpDisplayLayerChromium.hIOSurfaceLayerChromium.cppIOSurfaceLayerChromium.hImageLayerChromium.cppImageLayerChromium.hLayerChromium.cppLayerChromium.hLayerPainterChromium.hLayerTextureSubImage.cppLayerTextureSubImage.hLayerTextureUpdater.hPlatformColor.hProgramBinding.cppProgramBinding.hRateLimiter.cppRateLimiter.hRenderSurfaceChromium.cppRenderSurfaceChromium.hScrollbarLayerChromium.cppScrollbarLayerChromium.hShaderChromium.cppShaderChromium.hSkPictureCanvasLayerTextureUpdater.cppSkPictureCanvasLayerTextureUpdater.hSolidColorLayerChromium.cppSolidColorLayerChromium.hTextureCopier.cppTextureCopier.hTextureLayerChromium.cppTextureLayerChromium.hTextureLayerChromiumClient.hTextureUploader.hThrottledTextureUploader.cppThrottledTextureUploader.hTiledLayerChromium.cppTiledLayerChromium.hTreeSynchronizer.cppTreeSynchronizer.hUnthrottledTextureUploader.hVideoLayerChromium.cppVideoLayerChromium.hcc.gypi
stubs
test
webkit/compositor_bindings

@ -13,7 +13,7 @@
#include "PlatformColor.h"
#include "skia/ext/platform_canvas.h"
namespace WebCore {
namespace cc {
BitmapCanvasLayerTextureUpdater::Texture::Texture(BitmapCanvasLayerTextureUpdater* textureUpdater, PassOwnPtr<CCPrioritizedTexture> texture)
: LayerTextureUpdater::Texture(texture)
@ -85,5 +85,5 @@ void BitmapCanvasLayerTextureUpdater::setOpaque(bool opaque)
m_opaque = opaque;
}
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -12,7 +12,7 @@
class SkCanvas;
namespace WebCore {
namespace cc {
class LayerPainterChromium;
@ -52,6 +52,6 @@ private:
bool m_opaque;
};
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)
#endif // BitmapCanvasLayerTextureUpdater_h

@ -16,7 +16,7 @@
#include "SkDevice.h"
#include <wtf/CurrentTime.h>
namespace WebCore {
namespace cc {
BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture(BitmapSkPictureCanvasLayerTextureUpdater* textureUpdater, PassOwnPtr<CCPrioritizedTexture> texture)
: CanvasLayerTextureUpdater::Texture(texture)
@ -80,5 +80,5 @@ void BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect(SkCanvas* canva
stats.totalRasterizeTimeInSeconds += monotonicallyIncreasingTime() - rasterizeBeginTime;
}
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -10,7 +10,7 @@
#include "SkBitmap.h"
#include "SkPictureCanvasLayerTextureUpdater.h"
namespace WebCore {
namespace cc {
// This class records the contentRect into an SkPicture, then software rasterizes
// the SkPicture into bitmaps for each tile. This implements CCSettings::perTilePainting.
@ -40,6 +40,6 @@ public:
private:
explicit BitmapSkPictureCanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChromium>);
};
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)
#endif // BitmapSkPictureCanvasLayerTextureUpdater_h

@ -30,7 +30,7 @@ static const char* const s_runStateNames[] = {
"Aborted"
};
COMPILE_ASSERT(static_cast<int>(WebCore::CCActiveAnimation::RunStateEnumSize) == WTF_ARRAY_LENGTH(s_runStateNames), RunState_names_match_enum);
COMPILE_ASSERT(static_cast<int>(cc::CCActiveAnimation::RunStateEnumSize) == WTF_ARRAY_LENGTH(s_runStateNames), RunState_names_match_enum);
// This should match the TargetProperty enum.
static const char* const s_targetPropertyNames[] = {
@ -38,11 +38,11 @@ static const char* const s_targetPropertyNames[] = {
"Opacity"
};
COMPILE_ASSERT(static_cast<int>(WebCore::CCActiveAnimation::TargetPropertyEnumSize) == WTF_ARRAY_LENGTH(s_targetPropertyNames), TargetProperty_names_match_enum);
COMPILE_ASSERT(static_cast<int>(cc::CCActiveAnimation::TargetPropertyEnumSize) == WTF_ARRAY_LENGTH(s_targetPropertyNames), TargetProperty_names_match_enum);
} // namespace
namespace WebCore {
namespace cc {
PassOwnPtr<CCActiveAnimation> CCActiveAnimation::create(PassOwnPtr<CCAnimationCurve> curve, int animationId, int groupId, TargetProperty targetProperty)
{
@ -207,4 +207,4 @@ void CCActiveAnimation::pushPropertiesTo(CCActiveAnimation* other) const
}
}
} // namespace WebCore
} // namespace cc

@ -9,7 +9,7 @@
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
class CCAnimationCurve;
@ -156,6 +156,6 @@ private:
bool m_isControllingInstance;
};
} // namespace WebCore
} // namespace cc
#endif // CCActiveAnimation_h

@ -12,7 +12,7 @@
#include <wtf/Vector.h>
using namespace WebKitTests;
using namespace WebCore;
using namespace cc;
namespace {

@ -6,7 +6,7 @@
#include "CCAnimationCurve.h"
namespace WebCore {
namespace cc {
const CCFloatAnimationCurve* CCAnimationCurve::toFloatAnimationCurve() const
{
@ -20,4 +20,4 @@ const CCTransformAnimationCurve* CCAnimationCurve::toTransformAnimationCurve() c
return static_cast<const CCTransformAnimationCurve*>(this);
}
} // namespace WebCore
} // namespace cc

@ -8,7 +8,7 @@
#include <public/WebTransformationMatrix.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
class CCFloatAnimationCurve;
class CCTransformAnimationCurve;
@ -51,6 +51,6 @@ public:
virtual Type type() const OVERRIDE { return Transform; }
};
} // namespace WebCore
} // namespace cc
#endif // CCAnimation_h

@ -10,7 +10,7 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
namespace cc {
struct CCAnimationEvent {
enum Type { Started, Finished };
@ -33,6 +33,6 @@ struct CCAnimationEvent {
typedef Vector<CCAnimationEvent> CCAnimationEventsVector;
} // namespace WebCore
} // namespace cc
#endif // CCAnimationEvents_h

@ -5,7 +5,7 @@
#ifndef CCAppendQuadsData_h
#define CCAppendQuadsData_h
namespace WebCore {
namespace cc {
struct CCAppendQuadsData {
CCAppendQuadsData()

@ -6,7 +6,7 @@
#include "CCCheckerboardDrawQuad.h"
namespace WebCore {
namespace cc {
PassOwnPtr<CCCheckerboardDrawQuad> CCCheckerboardDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect)
{

@ -8,7 +8,7 @@
#include "CCDrawQuad.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
#pragma pack(push, 4)

@ -7,7 +7,7 @@
#include "base/synchronization/waitable_event.h"
namespace WebCore {
namespace cc {
// Used for making blocking calls from one thread to another. Use only when
// absolutely certain that doing-so will not lead to a deadlock.

@ -16,7 +16,7 @@
using WebKit::WebTransformationMatrix;
namespace WebCore {
namespace cc {
PassOwnPtr<CCDamageTracker> CCDamageTracker::create()
{
@ -340,6 +340,6 @@ void CCDamageTracker::extendDamageForRenderSurface(CCLayerImpl* layer, FloatRect
expandDamageRectInsideRectWithFilters(targetDamageRect, surfaceRectInTargetSpace, layer->backgroundFilters());
}
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -14,7 +14,7 @@ namespace WebKit {
class WebFilterOperations;
}
namespace WebCore {
namespace cc {
class CCLayerImpl;
class CCRenderSurface;
@ -57,6 +57,6 @@ private:
bool m_forceFullDamageNextUpdate;
};
} // namespace WebCore
} // namespace cc
#endif // CCDamageTracker_h

@ -16,7 +16,7 @@
#include <public/WebFilterOperation.h>
#include <public/WebFilterOperations.h>
using namespace WebCore;
using namespace cc;
using namespace WebKit;
using namespace WTF;
using namespace WebKitTests;

@ -6,7 +6,7 @@
#include "CCDebugBorderDrawQuad.h"
namespace WebCore {
namespace cc {
PassOwnPtr<CCDebugBorderDrawQuad> CCDebugBorderDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, SkColor color, int width)
{

@ -9,7 +9,7 @@
#include "SkColor.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
#pragma pack(push, 4)

@ -12,7 +12,7 @@
#include "CCLayerTreeHost.h"
#include "CCMathUtil.h"
namespace WebCore {
namespace cc {
CCDebugRectHistory::CCDebugRectHistory()
{
@ -111,6 +111,6 @@ void CCDebugRectHistory::saveOccludingRects(const Vector<IntRect>& occludingRect
m_debugRects.append(CCDebugRect(OccludingRectType, occludingRects[i]));
}
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -13,7 +13,7 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
namespace cc {
class CCLayerImpl;
struct CCLayerTreeSettings;
@ -21,7 +21,7 @@ struct CCLayerTreeSettings;
// There are currently six types of debug rects:
//
// - Paint rects (update rects): regions of a layer that needed to be re-uploaded to the
// texture resource; in most cases implying that WebCore had to repaint them, too.
// texture resource; in most cases implying that they had to be repainted, too.
//
// - Property-changed rects: enclosing bounds of layers that cause changes to the screen
// even if the layer did not change internally. (For example, if the layer's opacity or
@ -76,7 +76,7 @@ private:
Vector<CCDebugRect> m_debugRects;
};
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -11,7 +11,7 @@
#include <wtf/CurrentTime.h>
#include <wtf/MathExtras.h>
namespace WebCore {
namespace cc {
namespace {

@ -9,7 +9,7 @@
#include "CCTimer.h"
#include <wtf/PassRefPtr.h>
namespace WebCore {
namespace cc {
class CCThread;

@ -11,8 +11,8 @@
#include <gtest/gtest.h>
#include <wtf/RefPtr.h>
using namespace cc;
using namespace WTF;
using namespace WebCore;
using namespace WebKitTests;
namespace {

@ -47,7 +47,7 @@ static WebTransformationMatrix windowMatrix(int x, int y, int width, int height)
return canvas;
}
namespace WebCore {
namespace cc {
//
// static
FloatRect CCDirectRenderer::quadVertexRect()

@ -9,7 +9,7 @@
#include "CCResourceProvider.h"
#include "CCScopedTexture.h"
namespace WebCore {
namespace cc {
class CCResourceProvider;

@ -16,7 +16,7 @@
#include "CCYUVVideoDrawQuad.h"
#include "IntRect.h"
namespace WebCore {
namespace cc {
CCDrawQuad::CCDrawQuad(const CCSharedQuadState* sharedQuadState, Material material, const IntRect& quadRect)
: m_sharedQuadState(sharedQuadState)

@ -7,7 +7,7 @@
#include "CCSharedQuadState.h"
namespace WebCore {
namespace cc {
// WARNING! All CCXYZDrawQuad classes must remain PODs (plain old data).
// They are intended to be "serializable" by copying their raw bytes, so they

@ -12,7 +12,7 @@
#include "SkCanvas.h"
#include <vector>
namespace WebCore {
namespace cc {
using namespace std;
@ -67,6 +67,6 @@ void CCFontAtlas::drawDebugAtlas(SkCanvas* canvas, const IntPoint& destPosition)
canvas->drawBitmapRect(m_atlas, &source, SkRect::MakeXYWH(destPosition.x(), destPosition.y(), m_atlas.width(), m_atlas.height()));
}
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -15,7 +15,7 @@
class SkCanvas;
namespace WebCore {
namespace cc {
class Color;
class FontDescription;
@ -58,7 +58,7 @@ private:
int m_fontHeight;
};
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -19,7 +19,7 @@ const int defaultMaxFramesPending = 2;
}
namespace WebCore {
namespace cc {
class CCFrameRateControllerTimeSourceAdapter : public CCTimeSourceClient {
public:

@ -11,7 +11,7 @@
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
class CCThread;
class CCTimeSource;

@ -9,13 +9,13 @@
#include "CCSchedulerTestCommon.h"
#include <gtest/gtest.h>
using namespace WTF;
using namespace WebCore;
using namespace cc;
using namespace WebKitTests;
using namespace WTF;
namespace {
class FakeCCFrameRateControllerClient : public WebCore::CCFrameRateControllerClient {
class FakeCCFrameRateControllerClient : public cc::CCFrameRateControllerClient {
public:
FakeCCFrameRateControllerClient() { reset(); }

@ -11,7 +11,7 @@
#include <public/Platform.h>
#include <wtf/CurrentTime.h>
namespace WebCore {
namespace cc {
const double CCFrameRateCounter::kFrameTooFast = 1.0 / 70.0; // measured in seconds
const double CCFrameRateCounter::kFrameTooSlow = 1.0 / 12.0;
@ -125,6 +125,6 @@ double CCFrameRateCounter::timeStampOfRecentFrame(int n)
return m_timeStampHistory[desiredIndex];
}
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -10,7 +10,7 @@
#include <wtf/Noncopyable.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
// This class maintains a history of timestamps, and provides functionality to
// intelligently compute average frames per second (and standard deviation).
@ -64,7 +64,7 @@ private:
int m_droppedFrameCount;
};
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -11,7 +11,7 @@
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
// FIXME: rename fully to CCOutputSurface.
typedef WebKit::WebCompositorOutputSurface CCGraphicsContext;

@ -20,7 +20,7 @@
#include "SkPaint.h"
#include "skia/ext/platform_canvas.h"
namespace WebCore {
namespace cc {
static inline SkPaint createPaint()
{

@ -11,7 +11,7 @@
class SkCanvas;
namespace WebCore {
namespace cc {
class CCDebugRectHistory;
class CCFontAtlas;

@ -9,7 +9,7 @@
#include "HeadsUpDisplayLayerChromium.h"
#include "LayerChromium.h"
using namespace WebCore;
using namespace cc;
using namespace WebKitTests;
namespace {

@ -6,7 +6,7 @@
#include "CCIOSurfaceDrawQuad.h"
namespace WebCore {
namespace cc {
PassOwnPtr<CCIOSurfaceDrawQuad> CCIOSurfaceDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, const IntSize& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation orientation)
{

@ -9,7 +9,7 @@
#include "IntSize.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
#pragma pack(push, 4)

@ -17,7 +17,7 @@
#include "Extensions3D.h"
#include <public/WebGraphicsContext3D.h>
namespace WebCore {
namespace cc {
CCIOSurfaceLayerImpl::CCIOSurfaceLayerImpl(int id)
: CCLayerImpl(id)

@ -8,7 +8,7 @@
#include "CCLayerImpl.h"
#include "IntSize.h"
namespace WebCore {
namespace cc {
class CCIOSurfaceLayerImpl : public CCLayerImpl {
public:

@ -8,7 +8,7 @@
#include <wtf/Noncopyable.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
class IntPoint;
class IntSize;

@ -10,7 +10,7 @@
using WebKit::WebTransformationMatrix;
namespace WebCore {
namespace cc {
namespace {
@ -218,4 +218,4 @@ WebTransformationMatrix CCKeyframedTransformAnimationCurve::getValue(double t) c
return m_keyframes[i+1]->value().blend(m_keyframes[i]->value(), progress);
}
} // namespace WebCore
} // namespace cc

@ -12,7 +12,7 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
namespace cc {
class CCKeyframe {
public:
@ -106,6 +106,6 @@ private:
Vector<OwnPtr<CCTransformKeyframe> > m_keyframes;
};
} // namespace WebCore
} // namespace cc
#endif // CCKeyframedAnimationCurve_h

@ -13,7 +13,7 @@
#include <wtf/OwnPtr.h>
#include <wtf/Vector.h>
using namespace WebCore;
using namespace cc;
using WebKit::WebTransformationMatrix;
namespace {

@ -14,7 +14,7 @@
using WebKit::WebTransformationMatrix;
namespace WebCore {
namespace cc {
CCLayerAnimationController::CCLayerAnimationController(CCLayerAnimationControllerClient* client)
: m_forceSync(false)
@ -404,4 +404,4 @@ void CCLayerAnimationController::tickAnimations(double monotonicTime)
}
}
} // namespace WebCore
} // namespace cc

@ -17,7 +17,7 @@ namespace WebKit {
class WebTransformationMatrix;
}
namespace WebCore {
namespace cc {
class Animation;
class IntSize;
@ -107,6 +107,6 @@ private:
Vector<OwnPtr<CCActiveAnimation> > m_activeAnimations;
};
} // namespace WebCore
} // namespace cc
#endif // CCLayerAnimationController_h

@ -14,7 +14,7 @@
#include <public/WebTransformationMatrix.h>
#include <wtf/Vector.h>
using namespace WebCore;
using namespace cc;
using namespace WebKitTests;
using WebKit::WebTransformationMatrix;

@ -19,7 +19,7 @@
using WebKit::WebTransformationMatrix;
namespace WebCore {
namespace cc {
CCLayerImpl::CCLayerImpl(int id)
: m_parent(0)

@ -21,7 +21,7 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
namespace cc {
class CCLayerSorter;
class CCLayerTreeHostImpl;

@ -12,8 +12,8 @@
#include <public/WebFilterOperation.h>
#include <public/WebFilterOperations.h>
using namespace cc;
using namespace WebKit;
using namespace WebCore;
namespace {

@ -13,7 +13,7 @@
#include "LayerChromium.h"
#include "RenderSurfaceChromium.h"
namespace WebCore {
namespace cc {
template <typename LayerType, typename LayerList, typename RenderSurfaceType, typename ActionType>
void CCLayerIteratorActions::BackToFront::begin(CCLayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>& it)
@ -145,6 +145,6 @@ template void CCLayerIteratorActions::FrontToBack::end(CCLayerIterator<CCLayerIm
template void CCLayerIteratorActions::FrontToBack::begin(CCLayerIterator<CCLayerImpl, Vector<CCLayerImpl*>, CCRenderSurface, FrontToBack>&);
template void CCLayerIteratorActions::FrontToBack::goToHighestInSubtree(CCLayerIterator<CCLayerImpl, Vector<CCLayerImpl*>, CCRenderSurface, FrontToBack>&);
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -11,7 +11,7 @@
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
namespace cc {
// These classes provide means to iterate over the RenderSurface-Layer tree.
@ -205,6 +205,6 @@ struct CCLayerIteratorActions {
};
};
} // namespace WebCore
} // namespace cc
#endif

@ -12,7 +12,7 @@
#include <gtest/gtest.h>
#include <public/WebTransformationMatrix.h>
using namespace WebCore;
using namespace cc;
using WebKit::WebTransformationMatrix;
using ::testing::Mock;
using ::testing::_;
@ -38,8 +38,8 @@ private:
, m_drawsContent(true)
{
setBounds(IntSize(100, 100));
setPosition(IntPoint::zero());
setAnchorPoint(IntPoint::zero());
setPosition(IntPoint());
setAnchorPoint(IntPoint());
}
bool m_drawsContent;

@ -9,7 +9,7 @@
#include "CCLayerQuad.h"
namespace WebCore {
namespace cc {
CCLayerQuad::Edge::Edge(const FloatPoint& p, const FloatPoint& q)
{
@ -61,6 +61,6 @@ void CCLayerQuad::toFloatArray(float flattened[12]) const
flattened[11] = m_bottom.z();
}
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -13,7 +13,7 @@
static const float kAntiAliasingInflateDistance = 0.5f;
namespace WebCore {
namespace cc {
class CCLayerQuad {
public:

@ -8,7 +8,7 @@
#include <gtest/gtest.h>
using namespace WebCore;
using namespace cc;
namespace {

@ -26,7 +26,7 @@ static WTFLogChannel LogCCLayerSorter = { 0x00000000, "", WTFLogChannelOff };
#endif
#endif
namespace WebCore {
namespace cc {
inline static float perpProduct(const FloatSize& u, const FloatSize& v)
{

@ -17,7 +17,7 @@ namespace WebKit {
class WebTransformationMatrix;
}
namespace WebCore {
namespace cc {
class CCLayerSorter {
WTF_MAKE_NONCOPYABLE(CCLayerSorter);

@ -12,7 +12,7 @@
#include <gtest/gtest.h>
#include <public/WebTransformationMatrix.h>
using namespace WebCore;
using namespace cc;
using WebKit::WebTransformationMatrix;
namespace {

@ -11,7 +11,7 @@
using namespace std;
namespace WebCore {
namespace cc {
PassOwnPtr<CCLayerTilingData> CCLayerTilingData::create(const IntSize& tileSize, BorderTexelOption border)
{
@ -34,7 +34,7 @@ void CCLayerTilingData::setTileSize(const IntSize& size)
m_tilingData.setMaxTextureSize(size);
}
const IntSize& CCLayerTilingData::tileSize() const
IntSize CCLayerTilingData::tileSize() const
{
return m_tilingData.maxTextureSize();
}
@ -144,6 +144,6 @@ IntSize CCLayerTilingData::bounds() const
return m_tilingData.totalSize();
}
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -15,7 +15,7 @@
#include <wtf/HashTraits.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
class CCLayerTilingData {
public:
@ -31,7 +31,7 @@ public:
// Change the tile size. This may invalidate all the existing tiles.
void setTileSize(const IntSize&);
const IntSize& tileSize() const;
IntSize tileSize() const;
// Change the border texel setting. This may invalidate all existing tiles.
void setBorderTexelOption(BorderTexelOption);
bool hasBorderTexels() const { return m_tilingData.borderTexels(); }

@ -32,7 +32,7 @@ namespace {
static int numLayerTreeInstances;
}
namespace WebCore {
namespace cc {
bool CCLayerTreeHost::s_needsFilterContext = false;
@ -785,4 +785,4 @@ void CCLayerTreeHost::setAnimationEventsRecursive(const CCAnimationEventsVector&
setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
}
} // namespace WebCore
} // namespace cc

@ -22,7 +22,7 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
namespace WebCore {
namespace cc {
class CCFontAtlas;
class CCLayerChromium;

@ -11,7 +11,7 @@ namespace WebKit {
class WebCompositorOutputSurface;
}
namespace WebCore {
namespace cc {
class CCInputHandler;
class IntSize;

@ -20,7 +20,7 @@
using WebKit::WebTransformationMatrix;
namespace WebCore {
namespace cc {
IntRect CCLayerTreeHostCommon::calculateVisibleRect(const IntRect& targetSurfaceRect, const IntRect& layerBoundRect, const WebTransformationMatrix& transform)
{
@ -782,7 +782,7 @@ void CCLayerTreeHostCommon::calculateDrawTransforms(LayerChromium* rootLayer, co
setupRootLayerAndSurfaceForRecursion<LayerChromium, Vector<RefPtr<LayerChromium> > >(rootLayer, renderSurfaceLayerList, deviceViewportSize);
WebCore::calculateDrawTransformsInternal<LayerChromium, Vector<RefPtr<LayerChromium> >, RenderSurfaceChromium, void>(rootLayer, rootLayer, deviceScaleTransform, identityMatrix, identityMatrix,
cc::calculateDrawTransformsInternal<LayerChromium, Vector<RefPtr<LayerChromium> >, RenderSurfaceChromium, void>(rootLayer, rootLayer, deviceScaleTransform, identityMatrix, identityMatrix,
rootLayer->renderSurface()->contentRect(), true, 0, renderSurfaceLayerList,
rootLayer->renderSurface()->layerList(), 0, maxTextureSize, deviceScaleFactor, totalDrawableContentRect);
}
@ -796,7 +796,7 @@ void CCLayerTreeHostCommon::calculateDrawTransforms(CCLayerImpl* rootLayer, cons
setupRootLayerAndSurfaceForRecursion<CCLayerImpl, Vector<CCLayerImpl*> >(rootLayer, renderSurfaceLayerList, deviceViewportSize);
WebCore::calculateDrawTransformsInternal<CCLayerImpl, Vector<CCLayerImpl*>, CCRenderSurface, CCLayerSorter>(rootLayer, rootLayer, deviceScaleTransform, identityMatrix, identityMatrix,
cc::calculateDrawTransformsInternal<CCLayerImpl, Vector<CCLayerImpl*>, CCRenderSurface, CCLayerSorter>(rootLayer, rootLayer, deviceScaleTransform, identityMatrix, identityMatrix,
rootLayer->renderSurface()->contentRect(), true, 0, renderSurfaceLayerList,
rootLayer->renderSurface()->layerList(), layerSorter, maxTextureSize, deviceScaleFactor, totalDrawableContentRect);
}
@ -882,4 +882,4 @@ CCLayerImpl* CCLayerTreeHostCommon::findLayerThatIsHitByPoint(const IntPoint& vi
return foundLayer;
}
} // namespace WebCore
} // namespace cc

@ -11,7 +11,7 @@
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
namespace cc {
class CCLayerImpl;
class CCLayerSorter;
@ -80,6 +80,6 @@ LayerType* CCLayerTreeHostCommon::findLayerInSubtree(LayerType* rootLayer, int l
return 0;
}
} // namespace WebCore
} // namespace cc
#endif

@ -23,7 +23,7 @@
#include <gtest/gtest.h>
#include <public/WebTransformationMatrix.h>
using namespace WebCore;
using namespace cc;
using namespace WebKitTests;
using WebKit::WebTransformationMatrix;

@ -34,7 +34,7 @@ using WebKit::WebTransformationMatrix;
namespace {
void didVisibilityChange(WebCore::CCLayerTreeHostImpl* id, bool visible)
void didVisibilityChange(cc::CCLayerTreeHostImpl* id, bool visible)
{
if (visible) {
TRACE_EVENT_ASYNC_BEGIN1("webkit", "CCLayerTreeHostImpl::setVisible", id, "CCLayerTreeHostImpl", id);
@ -46,7 +46,7 @@ void didVisibilityChange(WebCore::CCLayerTreeHostImpl* id, bool visible)
} // namespace
namespace WebCore {
namespace cc {
class CCLayerTreeHostImplTimeSourceAdapter : public CCTimeSourceClient {
WTF_MAKE_NONCOPYABLE(CCLayerTreeHostImplTimeSourceAdapter);
@ -1269,4 +1269,4 @@ void CCLayerTreeHostImpl::animateScrollbarsRecursive(CCLayerImpl* layer, double
animateScrollbarsRecursive(layer->children()[i].get(), monotonicTime);
}
} // namespace WebCore
} // namespace cc

@ -16,7 +16,7 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
namespace cc {
class CCCompletionEvent;
class CCDebugRectHistory;

@ -34,8 +34,8 @@
#include <public/WebVideoFrame.h>
#include <public/WebVideoFrameProvider.h>
using namespace cc;
using namespace CCLayerTestCommon;
using namespace WebCore;
using namespace WebKit;
using namespace WebKitTests;
@ -2107,7 +2107,7 @@ public:
// Unlimited texture size.
virtual void getIntegerv(WGC3Denum pname, WGC3Dint* value)
{
if (pname == WebCore::GraphicsContext3D::MAX_TEXTURE_SIZE)
if (pname == cc::GraphicsContext3D::MAX_TEXTURE_SIZE)
*value = 8192;
}
};
@ -2422,7 +2422,7 @@ class StrictWebGraphicsContext3DWithIOSurface : public StrictWebGraphicsContext3
public:
virtual WebString getString(WGC3Denum name) OVERRIDE
{
if (name == WebCore::GraphicsContext3D::EXTENSIONS)
if (name == cc::GraphicsContext3D::EXTENSIONS)
return WebString("GL_CHROMIUM_iosurface GL_ARB_texture_rectangle");
return WebString();
@ -2433,7 +2433,7 @@ class FakeWebGraphicsContext3DWithIOSurface : public FakeWebGraphicsContext3D {
public:
virtual WebString getString(WGC3Denum name) OVERRIDE
{
if (name == WebCore::GraphicsContext3D::EXTENSIONS)
if (name == cc::GraphicsContext3D::EXTENSIONS)
return WebString("GL_CHROMIUM_iosurface GL_ARB_texture_rectangle");
return WebString();
@ -2623,7 +2623,7 @@ public:
virtual WebString getString(WGC3Denum name) OVERRIDE
{
if (name == WebCore::GraphicsContext3D::EXTENSIONS)
if (name == cc::GraphicsContext3D::EXTENSIONS)
return WebString("GL_CHROMIUM_iosurface GL_ARB_texture_rectangle");
return WebString();

@ -25,7 +25,7 @@
#include <public/WebSize.h>
#include <wtf/OwnArrayPtr.h>
using namespace WebCore;
using namespace cc;
using namespace WebKit;
using namespace WebKitTests;
@ -2442,7 +2442,7 @@ private:
if (m_texture.get())
return;
m_texture = EvictionTrackingTexture::create(CCPrioritizedTexture::create(layerTreeHost()->contentsTextureManager()));
m_texture->texture()->setDimensions(WebCore::IntSize(10, 10), WebCore::GraphicsContext3D::RGBA);
m_texture->texture()->setDimensions(IntSize(10, 10), cc::GraphicsContext3D::RGBA);
}
OwnPtr<EvictionTrackingTexture> m_texture;

@ -13,7 +13,7 @@
using WebKit::WebTransformationMatrix;
namespace WebCore {
namespace cc {
static HomogeneousCoordinate projectHomogeneousPoint(const WebTransformationMatrix& transform, const FloatPoint& p)
{
@ -376,4 +376,4 @@ FloatSize CCMathUtil::projectVector(const FloatSize& source, const FloatSize& de
return FloatSize(projectedLength * destination.width(), projectedLength * destination.height());
}
} // namespace WebCore
} // namespace cc

@ -12,7 +12,7 @@ namespace WebKit {
class WebTransformationMatrix;
}
namespace WebCore {
namespace cc {
class IntRect;
class FloatRect;
@ -60,8 +60,6 @@ struct HomogeneousCoordinate {
double w;
};
// This class contains math helper functionality that does not belong in WebCore.
// It is possible that this functionality should be migrated to WebCore eventually.
class CCMathUtil {
public:
@ -104,6 +102,6 @@ public:
static FloatSize projectVector(const FloatSize& source, const FloatSize& destination);
};
} // namespace WebCore
} // namespace cc
#endif // #define CCMathUtil_h

@ -12,7 +12,7 @@
#include <gtest/gtest.h>
#include <public/WebTransformationMatrix.h>
using namespace WebCore;
using namespace cc;
using WebKit::WebTransformationMatrix;
namespace {

@ -17,7 +17,7 @@
using namespace std;
using WebKit::WebTransformationMatrix;
namespace WebCore {
namespace cc {
template<typename LayerType, typename RenderSurfaceType>
CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::CCOcclusionTrackerBase(IntRect rootTargetRect, bool recordMetricsForFrame)
@ -127,7 +127,7 @@ static inline Region transformSurfaceOpaqueRegion(const RenderSurfaceType* surfa
Region transformedRegion;
Vector<IntRect> rects = region.rects();
Vector<WebCore::IntRect> rects = region.rects();
for (size_t i = 0; i < rects.size(); ++i) {
// We've already checked for clipping in the mapQuad call above, these calls should not clip anything further.
IntRect transformedRect = enclosedIntRect(CCMathUtil::mapClippedRect(transform, FloatRect(rects[i])));
@ -144,11 +144,11 @@ static inline void reduceOcclusion(const IntRect& affectedArea, const IntRect& e
return;
Region affectedOcclusion = intersect(occlusion, affectedArea);
Vector<IntRect> affectedOcclusionRects = affectedOcclusion.rects();
Vector<WebCore::IntRect> affectedOcclusionRects = affectedOcclusion.rects();
occlusion.subtract(affectedArea);
for (size_t j = 0; j < affectedOcclusionRects.size(); ++j) {
IntRect& occlusionRect = affectedOcclusionRects[j];
WebCore::IntRect& occlusionRect = affectedOcclusionRects[j];
// Shrink the rect by expanding the non-opaque pixels outside the rect.
@ -255,7 +255,7 @@ static inline void addOcclusionBehindLayer(Region& region, const LayerType* laye
if (clipped || !visibleTransformedQuad.isRectilinear())
return;
Vector<IntRect> contentRects = opaqueContents.rects();
Vector<WebCore::IntRect> contentRects = opaqueContents.rects();
for (size_t i = 0; i < contentRects.size(); ++i) {
// We've already checked for clipping in the mapQuad call above, these calls should not clip anything further.
IntRect transformedRect = enclosedIntRect(CCMathUtil::mapClippedRect(transform, FloatRect(contentRects[i])));
@ -478,5 +478,5 @@ template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unocclude
template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::layerClipRectInTarget(const CCLayerImpl*) const;
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -9,7 +9,7 @@
#include "FloatQuad.h"
#include "Region.h"
namespace WebCore {
namespace cc {
class CCOverdrawMetrics;
class CCLayerImpl;
class CCRenderSurface;

@ -23,7 +23,7 @@
#include <public/WebFilterOperations.h>
#include <public/WebTransformationMatrix.h>
using namespace WebCore;
using namespace cc;
using namespace WebKit;
using namespace WebKitTests;

@ -19,7 +19,7 @@
using WebKit::WebTransformationMatrix;
namespace WebCore {
namespace cc {
CCOverdrawMetrics::CCOverdrawMetrics(bool recordMetricsForFrame)
: m_recordMetricsForFrame(recordMetricsForFrame)
@ -185,6 +185,6 @@ void CCOverdrawMetrics::recordMetricsInternal(MetricsType metricsType, const Lay
}
}
} // namespace WebCore
} // namespace cc
#endif

@ -11,7 +11,7 @@ namespace WebKit {
class WebTransformationMatrix;
}
namespace WebCore {
namespace cc {
class IntRect;
class CCLayerTreeHost;
class CCLayerTreeHostImpl;
@ -92,6 +92,6 @@ private:
float m_pixelsCulledForDrawing;
};
} // namespace WebCore
} // namespace cc
#endif

@ -11,7 +11,7 @@
#include <math.h>
namespace WebCore {
namespace cc {
PassOwnPtr<CCPageScaleAnimation> CCPageScaleAnimation::create(const IntSize& scrollStart, float pageScaleStart, const IntSize& windowSize, const IntSize& contentSize, double startTime)
{
@ -156,4 +156,4 @@ float CCPageScaleAnimation::pageScaleAtRatio(float ratio) const
return m_pageScaleStart * diff;
}
} // namespace WebCore
} // namespace cc

@ -8,7 +8,7 @@
#include "IntSize.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
// A small helper class that does the math for zoom animations, primarily for
// double-tap zoom. Initialize it with starting and ending scroll/page scale
@ -69,6 +69,6 @@ private:
double m_duration;
};
} // namespace WebCore
} // namespace cc
#endif

@ -12,7 +12,7 @@
using namespace std;
namespace WebCore {
namespace cc {
CCPrioritizedTexture::CCPrioritizedTexture(CCPrioritizedTextureManager* manager, IntSize size, GC3Denum format)
: m_size(size)
@ -119,4 +119,4 @@ void CCPrioritizedTexture::setToSelfManagedMemoryPlaceholder(size_t bytes)
m_bytes = bytes;
}
} // namespace WebCore
} // namespace cc

@ -12,7 +12,7 @@
#include "IntRect.h"
#include "IntSize.h"
namespace WebCore {
namespace cc {
class CCPrioritizedTextureManager;
@ -116,6 +116,6 @@ private:
CCPrioritizedTextureManager* m_manager;
};
} // WebCore
} // namespace cc
#endif

@ -14,7 +14,7 @@
using namespace std;
namespace WebCore {
namespace cc {
CCPrioritizedTextureManager::CCPrioritizedTextureManager(size_t maxMemoryLimitBytes, int, int pool)
: m_maxMemoryLimitBytes(maxMemoryLimitBytes)
@ -362,4 +362,4 @@ void CCPrioritizedTextureManager::assertInvariants()
#endif
} // namespace WebCore
} // namespace cc

@ -15,7 +15,7 @@
#include <wtf/ListHashSet.h>
#include <wtf/Vector.h>
namespace WebCore {
namespace cc {
class CCPrioritizedTexture;
class CCPriorityCalculator;
@ -115,6 +115,6 @@ private:
BackingVector m_tempBackingVector;
};
} // WebCore
} // cc
#endif

@ -14,7 +14,7 @@
#include "WebCompositorInitializer.h"
#include <gtest/gtest.h>
using namespace WebCore;
using namespace cc;
using namespace WebKitTests;
using namespace WTF;

@ -8,7 +8,7 @@
using namespace std;
namespace WebCore {
namespace cc {
// static
int CCPriorityCalculator::uiPriority(bool drawsToRootSurface)
@ -69,4 +69,4 @@ int CCPriorityCalculator::priorityFromVisibility(bool visible, bool drawsToRootS
return visible ? visiblePriority(drawsToRootSurface) : lowestPriority();
}
} // WebCore
} // cc

@ -9,7 +9,7 @@
#include "IntRect.h"
#include "IntSize.h"
namespace WebCore {
namespace cc {
class CCPriorityCalculator {
public:

@ -10,7 +10,7 @@
using namespace WTF;
namespace WebCore {
namespace cc {
namespace {
#ifndef NDEBUG

@ -11,7 +11,7 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
namespace WebCore {
namespace cc {
class CCThread;
struct CCRenderingStats;

@ -20,7 +20,7 @@
using namespace std;
namespace WebCore {
namespace cc {
static const int debugTileBorderWidth = 1;
static const int debugTileBorderAlpha = 120;
@ -92,5 +92,5 @@ bool CCQuadCuller::append(PassOwnPtr<CCDrawQuad> passDrawQuad, CCAppendQuadsData
return appendQuadInternal(passDrawQuad, culledRect, m_quadList, *m_occlusionTracker, m_showCullingWithDebugBorderQuads);
}
} // namespace WebCore
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)

@ -8,7 +8,7 @@
#include "CCQuadSink.h"
#include "CCRenderPass.h"
namespace WebCore {
namespace cc {
class CCLayerImpl;
class CCRenderSurface;
template<typename LayerType, typename SurfaceType>

@ -18,7 +18,7 @@
#include <gtest/gtest.h>
#include <public/WebTransformationMatrix.h>
using namespace WebCore;
using namespace cc;
using WebKit::WebTransformationMatrix;
namespace {

@ -7,7 +7,7 @@
#include <wtf/PassOwnPtr.h>
namespace WebCore {
namespace cc {
class CCDrawQuad;

@ -15,7 +15,7 @@
using WebKit::WebTransformationMatrix;
namespace WebCore {
namespace cc {
PassOwnPtr<CCRenderPass> CCRenderPass::create(Id id, IntRect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget)
{
@ -90,10 +90,10 @@ void CCRenderPass::appendQuadsToFillScreen(CCLayerImpl* rootLayer, SkColor scree
CCSharedQuadState* sharedQuadState = quadCuller.useSharedQuadState(CCSharedQuadState::create(rootLayer->drawTransform(), rootTargetRect, rootTargetRect, opacity, opaque));
ASSERT(rootLayer->screenSpaceTransform().isInvertible());
WebTransformationMatrix transformToLayerSpace = rootLayer->screenSpaceTransform().inverse();
Vector<IntRect> fillRects = fillRegion.rects();
Vector<WebCore::IntRect> fillRects = fillRegion.rects();
for (size_t i = 0; i < fillRects.size(); ++i) {
// The root layer transform is composed of translations and scales only, no perspective, so mapping is sufficient.
IntRect layerRect = CCMathUtil::mapClippedRect(transformToLayerSpace, fillRects[i]);
IntRect layerRect = CCMathUtil::mapClippedRect(transformToLayerSpace, cc::IntRect(fillRects[i]));
// Skip the quad culler and just append the quads directly to avoid occlusion checks.
m_quadList.append(CCSolidColorDrawQuad::create(sharedQuadState, layerRect, screenBackgroundColor));
}

@ -8,6 +8,7 @@
#include "CCDrawQuad.h"
#include "CCOcclusionTracker.h"
#include "CCSharedQuadState.h"
#include "FloatRect.h"
#include "SkColor.h"
#include <public/WebFilterOperations.h>
#include <public/WebTransformationMatrix.h>
@ -15,7 +16,7 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
namespace cc {
class CCLayerImpl;
class CCRenderSurface;
@ -103,29 +104,29 @@ protected:
WebKit::WebFilterOperations m_backgroundFilters;
};
} // namespace WebCore
} // namespace cc
namespace WTF {
template<> struct HashTraits<WebCore::CCRenderPass::Id> : GenericHashTraits<WebCore::CCRenderPass::Id> {
template<> struct HashTraits<cc::CCRenderPass::Id> : GenericHashTraits<cc::CCRenderPass::Id> {
static const bool emptyValueIsZero = false;
static const bool needsDestruction = false;
static WebCore::CCRenderPass::Id emptyValue() { return WebCore::CCRenderPass::Id(0, 0); }
static void constructDeletedValue(WebCore::CCRenderPass::Id& slot) { slot = WebCore::CCRenderPass::Id(-1, -1); }
static bool isDeletedValue(WebCore::CCRenderPass::Id value) { return value.layerId == -1 && value.index == -1; }
static cc::CCRenderPass::Id emptyValue() { return cc::CCRenderPass::Id(0, 0); }
static void constructDeletedValue(cc::CCRenderPass::Id& slot) { slot = cc::CCRenderPass::Id(-1, -1); }
static bool isDeletedValue(cc::CCRenderPass::Id value) { return value.layerId == -1 && value.index == -1; }
};
template<> struct IntHash<WebCore::CCRenderPass::Id> {
static unsigned hash(const WebCore::CCRenderPass::Id& key) { return PairHash<int, int>::hash(std::make_pair(key.layerId, key.index)); }
static bool equal(const WebCore::CCRenderPass::Id& a, const WebCore::CCRenderPass::Id& b) { return a == b; }
template<> struct IntHash<cc::CCRenderPass::Id> {
static unsigned hash(const cc::CCRenderPass::Id& key) { return PairHash<int, int>::hash(std::make_pair(key.layerId, key.index)); }
static bool equal(const cc::CCRenderPass::Id& a, const cc::CCRenderPass::Id& b) { return a == b; }
static const bool safeToCompareToEmptyOrDeleted = true;
};
template<> struct DefaultHash<WebCore::CCRenderPass::Id> {
typedef IntHash<WebCore::CCRenderPass::Id> Hash;
template<> struct DefaultHash<cc::CCRenderPass::Id> {
typedef IntHash<cc::CCRenderPass::Id> Hash;
};
} // namespace WTF
namespace WebCore {
namespace cc {
typedef Vector<CCRenderPass*> CCRenderPassList;
typedef HashMap<CCRenderPass::Id, OwnPtr<CCRenderPass> > CCRenderPassIdHashMap;
} // namespace WebCore
} // namespace cc
#endif

@ -6,7 +6,7 @@
#include "CCRenderPassDrawQuad.h"
namespace WebCore {
namespace cc {
PassOwnPtr<CCRenderPassDrawQuad> CCRenderPassDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, CCRenderPass::Id renderPassId, bool isReplica, const CCResourceProvider::ResourceId maskResourceId, const IntRect& contentsChangedSinceLastFrame, float maskTexCoordScaleX, float maskTexCoordScaleY, float maskTexCoordOffsetX, float maskTexCoordOffsetY)
{

Some files were not shown because too many files have changed in this diff Show More