12011-01-06 Chris Marrin <cmarrin@apple.com>
2
3 Reviewed by NOBODY (OOPS!).
4
5 Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
6 https://bugs.webkit.org/show_bug.cgi?id=49388
7
8 Changed PlatformCALayer API. Added PlatformCALayerClient abstract class which is
9 used to communicate from PlatformCALayer to the owner. This replaces passing
10 GraphicsLayerCA pointer when creating PlatformCALayer. It also includes the
11 API that used to be in PlatformCALayerLayout. GraphicsLayerCA now implements
12 the PlatformCALayerClient API.
13
14 This change has little impact on the Mac side but makes the Windows
15 interface simpler, especially when handling video layers on Windows.
16
17 * WebCore.xcodeproj/project.pbxproj:
18 * config.h:
19 * platform/graphics/GraphicsLayer.h:
20 (WebCore::GraphicsLayer::layerDidDisplay):
21 (WebCore::GraphicsLayer::showDebugBorders):
22 (WebCore::GraphicsLayer::showRepaintCounter):
23 * platform/graphics/ca/GraphicsLayerCA.cpp:
24 (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
25 (WebCore::GraphicsLayerCA::setContentsToImage):
26 (WebCore::GraphicsLayerCA::setContentsToMedia):
27 (WebCore::GraphicsLayerCA::layerDidDisplay):
28 (WebCore::GraphicsLayerCA::updateSublayerList):
29 * platform/graphics/ca/GraphicsLayerCA.h:
30 (WebCore::GraphicsLayerCA::platformCALayerLayoutSublayersOfLayer):
31 (WebCore::GraphicsLayerCA::platformCALayerRespondsToLayoutChanges):
32 (WebCore::GraphicsLayerCA::platformCALayerContentsOrientation):
33 (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
34 (WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders):
35 (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
36 (WebCore::GraphicsLayerCA::platformCALayerIncrementRepaintCount):
37 (WebCore::GraphicsLayerCA::platformCALayerContentsOpaque):
38 (WebCore::GraphicsLayerCA::platformCALayerDrawsContent):
39 (WebCore::GraphicsLayerCA::platformCALayerLayerDidDisplay):
40 (WebCore::GraphicsLayerCA::platformCALayer):
41 * platform/graphics/ca/PlatformCALayer.h:
42 (WebCore::PlatformCALayer::owner):
43 (WebCore::PlatformCALayer::animationStarted):
44 * platform/graphics/ca/PlatformCALayerClient.h: Added.
45 (WebCore::PlatformCALayerClient::~PlatformCALayerClient):
46 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
47 (PlatformCALayer::setOwner):
48 (PlatformCALayer::create):
49 (PlatformCALayer::PlatformCALayer):
50 (PlatformCALayer::contents):
51 (PlatformCALayer::setContents):
52 * platform/graphics/mac/WebGLLayer.mm:
53 (-[WebGLLayer display]):
54 * platform/graphics/mac/WebLayer.h:
55 * platform/graphics/mac/WebLayer.mm:
56 (drawLayerContents):
57 (setLayerNeedsDisplayInRect):
58 (-[WebLayer setNeedsDisplay]):
59 (-[WebLayer display]):
60 * platform/graphics/mac/WebTiledLayer.mm:
61 (-[WebTiledLayer setNeedsDisplay]):
62 (-[WebTiledLayer display]):
63 * rendering/RenderLayerBacking.cpp:
64 (WebCore::RenderLayerBacking::showDebugBorders):
65 (WebCore::RenderLayerBacking::showRepaintCounter):
66 * rendering/RenderLayerCompositor.cpp:
67 (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
68 * rendering/RenderLayerCompositor.h:
69 (WebCore::RenderLayerCompositor::compositorShowDebugBorders):
70 (WebCore::RenderLayerCompositor::compositorShowRepaintCounter):
71 (WebCore::RenderLayerCompositor::notifyAnimationStarted):
72 (WebCore::RenderLayerCompositor::notifySyncRequired):
73 (WebCore::RenderLayerCompositor::paintContents):
74 (WebCore::RenderLayerCompositor::showDebugBorders):
75 (WebCore::RenderLayerCompositor::showRepaintCounter):
76