Changeset 145148 in webkit
- Timestamp:
- Mar 7, 2013 3:54:13 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 14 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r145142 r145148 1 2013-03-07 Simon Fraser <simon.fraser@apple.com> 2 3 Rename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer 4 https://bugs.webkit.org/show_bug.cgi?id=111779 5 6 Reviewed by Tim Horton. 7 8 "TileCache" was a name conflict in downstream code, so rename it to TileController. 9 The layer that has a TileController is now a WebTiledBackingLayer (which fits with 10 the TiledBacking API that TileController exposes). 11 12 Also renamed the flags in PlatformCALayer to match. 13 14 Rename only, no behavior change. 15 16 * WebCore.xcodeproj/project.pbxproj: 17 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: 18 (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea): 19 * platform/graphics/GraphicsLayerClient.h: 20 (WebCore::GraphicsLayerClient::shouldUseTiledBacking): 21 * platform/graphics/ca/GraphicsLayerCA.cpp: 22 (WebCore::GraphicsLayerCA::GraphicsLayerCA): 23 (WebCore::GraphicsLayerCA::recursiveCommitChanges): 24 (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter): 25 (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles): 26 (WebCore::GraphicsLayerCA::updateVisibleRect): 27 (WebCore::GraphicsLayerCA::getDebugBorderInfo): 28 (WebCore::GraphicsLayerCA::requiresTiledLayer): 29 (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): 30 * platform/graphics/ca/GraphicsLayerCA.h: 31 * platform/graphics/ca/PlatformCALayer.h: 32 (WebCore::PlatformCALayer::usesTiledBackingLayer): 33 * platform/graphics/ca/mac/PlatformCALayerMac.mm: 34 (PlatformCALayer::PlatformCALayer): 35 (PlatformCALayer::~PlatformCALayer): 36 (PlatformCALayer::tiledBacking): 37 * platform/graphics/ca/mac/TileController.h: Renamed from Source/WebCore/platform/graphics/ca/mac/TileCache.h. 38 * platform/graphics/ca/mac/WebTileLayer.h: 39 (TileController): 40 * platform/graphics/ca/mac/WebTileLayer.mm: 41 (-[WebTileLayer drawInContext:]): 42 (-[WebTileLayer setTileController:WebCore::]): 43 (-[WebTileLayer logFilledFreshTile]): 44 * platform/graphics/ca/mac/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.h. 45 * platform/graphics/ca/mac/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.mm. 46 * platform/graphics/mac/WebLayer.mm: 47 (drawLayerContents): 48 * rendering/RenderLayerBacking.cpp: 49 (WebCore::RenderLayerBacking::RenderLayerBacking): 50 (WebCore::RenderLayerBacking::shouldUseTiledBacking): 51 (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): 52 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): 53 * rendering/RenderLayerBacking.h: 54 (WebCore::RenderLayerBacking::usingTiledBacking): 55 (RenderLayerBacking): 56 (WebCore::RenderLayerBacking::hasTiledBackingFlatteningLayer): 57 * rendering/RenderLayerCompositor.cpp: 58 (WebCore::RenderLayerCompositor::frameViewDidLayout): 59 (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged): 60 (WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing): 61 1 62 2013-03-07 Alexey Proskuryakov <ap@apple.com> 2 63 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r145061 r145148 262 262 0F580CFF0F12DE9B0051D689 /* RenderLayerBacking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */; settings = {ATTRIBUTES = (Private, ); }; }; 263 263 0F580D000F12DE9B0051D689 /* RenderLayerBacking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F580CFC0F12DE9B0051D689 /* RenderLayerBacking.cpp */; }; 264 0F580FA31496939100FB5BD8 /* WebTile CacheLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580FA11496939100FB5BD8 /* WebTileCacheLayer.h */; };265 0F580FA41496939100FB5BD8 /* WebTile CacheLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F580FA21496939100FB5BD8 /* WebTileCacheLayer.mm */; };264 0F580FA31496939100FB5BD8 /* WebTiledBackingLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580FA11496939100FB5BD8 /* WebTiledBackingLayer.h */; }; 265 0F580FA41496939100FB5BD8 /* WebTiledBackingLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F580FA21496939100FB5BD8 /* WebTiledBackingLayer.mm */; }; 266 266 0F580FAF149800D400FB5BD8 /* AnimationUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580FAE149800D400FB5BD8 /* AnimationUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; }; 267 267 0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */; }; … … 516 516 1A98956B0AA78F80005EF5EF /* KURLCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A98956A0AA78F80005EF5EF /* KURLCFNet.cpp */; }; 517 517 1AA21250163F0DA80000E63F /* AtomicStringCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA2124F163F0DA80000E63F /* AtomicStringCF.cpp */; }; 518 1AA7160A149BC4DB0016EC19 /* TileC ache.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA71608149BC4DA0016EC19 /* TileCache.mm */; };519 1AA7160B149BC4DB0016EC19 /* TileC ache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA71609149BC4DB0016EC19 /* TileCache.h */; };518 1AA7160A149BC4DB0016EC19 /* TileController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA71608149BC4DA0016EC19 /* TileController.mm */; }; 519 1AA7160B149BC4DB0016EC19 /* TileController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA71609149BC4DB0016EC19 /* TileController.h */; }; 520 520 1AA7161E149BF2FA0016EC19 /* WebTileLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA7161C149BF2FA0016EC19 /* WebTileLayer.mm */; }; 521 521 1AA84F04143BA7BD0051D153 /* ScrollElasticityController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA84F02143BA7BD0051D153 /* ScrollElasticityController.mm */; }; … … 7582 7582 0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderLayerBacking.h; sourceTree = "<group>"; }; 7583 7583 0F580CFC0F12DE9B0051D689 /* RenderLayerBacking.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLayerBacking.cpp; sourceTree = "<group>"; }; 7584 0F580FA11496939100FB5BD8 /* WebTile CacheLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebTileCacheLayer.h; path = ca/mac/WebTileCacheLayer.h; sourceTree = "<group>"; };7585 0F580FA21496939100FB5BD8 /* WebTile CacheLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebTileCacheLayer.mm; path = ca/mac/WebTileCacheLayer.mm; sourceTree = "<group>"; };7584 0F580FA11496939100FB5BD8 /* WebTiledBackingLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebTiledBackingLayer.h; path = ca/mac/WebTiledBackingLayer.h; sourceTree = "<group>"; }; 7585 0F580FA21496939100FB5BD8 /* WebTiledBackingLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebTiledBackingLayer.mm; path = ca/mac/WebTiledBackingLayer.mm; sourceTree = "<group>"; }; 7586 7586 0F580FAE149800D400FB5BD8 /* AnimationUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationUtilities.h; path = animation/AnimationUtilities.h; sourceTree = "<group>"; }; 7587 7587 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderEmbeddedObject.cpp; sourceTree = "<group>"; }; … … 7869 7869 1A98956A0AA78F80005EF5EF /* KURLCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = KURLCFNet.cpp; sourceTree = "<group>"; }; 7870 7870 1AA2124F163F0DA80000E63F /* AtomicStringCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicStringCF.cpp; sourceTree = "<group>"; }; 7871 1AA71608149BC4DA0016EC19 /* TileC ache.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TileCache.mm; path = ca/mac/TileCache.mm; sourceTree = "<group>"; };7872 1AA71609149BC4DB0016EC19 /* TileC ache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TileCache.h; path = ca/mac/TileCache.h; sourceTree = "<group>"; };7871 1AA71608149BC4DA0016EC19 /* TileController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TileController.mm; path = ca/mac/TileController.mm; sourceTree = "<group>"; }; 7872 1AA71609149BC4DB0016EC19 /* TileController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TileController.h; path = ca/mac/TileController.h; sourceTree = "<group>"; }; 7873 7873 1AA7161C149BF2FA0016EC19 /* WebTileLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebTileLayer.mm; path = ca/mac/WebTileLayer.mm; sourceTree = "<group>"; }; 7874 7874 1AA71625149BFFB20016EC19 /* WebTileLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebTileLayer.h; path = ca/mac/WebTileLayer.h; sourceTree = "<group>"; }; … … 9573 9573 7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowFocusAllowedIndicator.h; sourceTree = "<group>"; }; 9574 9574 7EA30F6216DFD62700257D0B /* WebGLCompressedTextureATC.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLCompressedTextureATC.idl; path = canvas/WebGLCompressedTextureATC.idl; sourceTree = "<group>"; }; 9575 7EA30F6716DFFE7500257D0B /* JSWebGLCompressedTextureATC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGLCompressedTextureATC.cpp;path = JSWebGLCompressedTextureATC.cpp; sourceTree = "<group>"; };9576 7EA30F6816DFFE7500257D0B /* JSWebGLCompressedTextureATC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGLCompressedTextureATC.h;path = JSWebGLCompressedTextureATC.h; sourceTree = "<group>"; };9575 7EA30F6716DFFE7500257D0B /* JSWebGLCompressedTextureATC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLCompressedTextureATC.cpp; sourceTree = "<group>"; }; 9576 7EA30F6816DFFE7500257D0B /* JSWebGLCompressedTextureATC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLCompressedTextureATC.h; sourceTree = "<group>"; }; 9577 9577 7EE6844C12D26E3800E79415 /* AuthenticationCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticationCF.cpp; sourceTree = "<group>"; }; 9578 9578 7EE6844D12D26E3800E79415 /* AuthenticationCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthenticationCF.h; sourceTree = "<group>"; }; … … 15889 15889 4958781F12A57DDF007238AC /* PlatformCAAnimationMac.mm */, 15890 15890 4958782012A57DDF007238AC /* PlatformCALayerMac.mm */, 15891 1AA71609149BC4DB0016EC19 /* TileC ache.h */,15892 1AA71608149BC4DA0016EC19 /* TileC ache.mm */,15893 0F580FA11496939100FB5BD8 /* WebTile CacheLayer.h */,15894 0F580FA21496939100FB5BD8 /* WebTile CacheLayer.mm */,15891 1AA71609149BC4DB0016EC19 /* TileController.h */, 15892 1AA71608149BC4DA0016EC19 /* TileController.mm */, 15893 0F580FA11496939100FB5BD8 /* WebTiledBackingLayer.h */, 15894 0F580FA21496939100FB5BD8 /* WebTiledBackingLayer.mm */, 15895 15895 1AA71625149BFFB20016EC19 /* WebTileLayer.h */, 15896 15896 1AA7161C149BF2FA0016EC19 /* WebTileLayer.mm */, … … 26459 26459 E1FF57A30F01255B00891EBB /* ThreadGlobalData.h in Headers */, 26460 26460 185BCF290F3279CE000EA262 /* ThreadTimers.h in Headers */, 26461 1AA7160B149BC4DB0016EC19 /* TileC ache.h in Headers */,26461 1AA7160B149BC4DB0016EC19 /* TileController.h in Headers */, 26462 26462 1AF89A421518FDEA00E547B5 /* TiledBacking.h in Headers */, 26463 26463 498770F31242C535002226BA /* TilingData.h in Headers */, … … 26599 26599 97AABD2914FA09D5007457AE /* WebSocketHandshakeRequest.h in Headers */, 26600 26600 97AABD2B14FA09D5007457AE /* WebSocketHandshakeResponse.h in Headers */, 26601 0F580FA31496939100FB5BD8 /* WebTile CacheLayer.h in Headers */,26601 0F580FA31496939100FB5BD8 /* WebTiledBackingLayer.h in Headers */, 26602 26602 0FCF332D0F2B9A25004B6795 /* WebTiledLayer.h in Headers */, 26603 26603 CD82030A1395AB6A00F956C6 /* WebVideoFullscreenController.h in Headers */, … … 26692 26692 7E66E23416D6EB6C00F7E7FF /* WebGLCompressedTextureATC.h in Headers */, 26693 26693 7EA30F6A16DFFE7500257D0B /* JSWebGLCompressedTextureATC.h in Headers */, 26694 26694 2D8287F716E4A0380086BD00 /* HitTestLocation.h in Headers */, 26695 26695 ); 26696 26696 runOnlyForDeploymentPostprocessing = 0; … … 29692 29692 E1FF57A60F01256B00891EBB /* ThreadGlobalData.cpp in Sources */, 29693 29693 185BCF280F3279CE000EA262 /* ThreadTimers.cpp in Sources */, 29694 1AA7160A149BC4DB0016EC19 /* TileC ache.mm in Sources */,29694 1AA7160A149BC4DB0016EC19 /* TileController.mm in Sources */, 29695 29695 498770F21242C535002226BA /* TilingData.cpp in Sources */, 29696 29696 F55B3DDB1251F12D003EF269 /* TimeInputType.cpp in Sources */, … … 29810 29810 97AABD2814FA09D5007457AE /* WebSocketHandshakeRequest.cpp in Sources */, 29811 29811 97AABD2A14FA09D5007457AE /* WebSocketHandshakeResponse.cpp in Sources */, 29812 0F580FA41496939100FB5BD8 /* WebTile CacheLayer.mm in Sources */,29812 0F580FA41496939100FB5BD8 /* WebTiledBackingLayer.mm in Sources */, 29813 29813 0FCF332C0F2B9A25004B6795 /* WebTiledLayer.mm in Sources */, 29814 29814 1AA7161E149BF2FA0016EC19 /* WebTileLayer.mm in Sources */, … … 29895 29895 7E66E23316D6EB6C00F7E7FF /* WebGLCompressedTextureATC.cpp in Sources */, 29896 29896 7EA30F6916DFFE7500257D0B /* JSWebGLCompressedTextureATC.cpp in Sources */, 29897 29897 2D8287F616E4A0380086BD00 /* HitTestLocation.cpp in Sources */, 29898 29898 ); 29899 29899 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm
r143418 r145148 35 35 #include "ScrollingStateTree.h" 36 36 #include "Settings.h" 37 #include "TileC ache.h"37 #include "TileController.h" 38 38 #include "WebTileLayer.h" 39 39 … … 383 383 384 384 IntPoint scrollPosition = this->scrollPosition(); 385 unsigned unfilledArea = TileC ache::blankPixelCountForTiles(tiles, viewportRect(), IntPoint(-scrollPosition.x(), -scrollPosition.y()));385 unsigned unfilledArea = TileController::blankPixelCountForTiles(tiles, viewportRect(), IntPoint(-scrollPosition.x(), -scrollPosition.y())); 386 386 387 387 if (unfilledArea || m_lastScrollHadUnfilledPixels) -
trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h
r145067 r145148 60 60 virtual ~GraphicsLayerClient() {} 61 61 62 virtual bool shouldUseTile Cache(const GraphicsLayer*) const { return false; }62 virtual bool shouldUseTiledBacking(const GraphicsLayer*) const { return false; } 63 63 64 64 // Callback for when hardware-accelerated animation started. -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r143537 r145148 276 276 , m_contentsLayerPurpose(NoContentsLayer) 277 277 , m_allowTiledLayer(true) 278 , m_isPageTile CacheLayer(false)278 , m_isPageTiledBackingLayer(false) 279 279 , m_uncommittedChanges(0) 280 280 { 281 281 PlatformCALayer::LayerType layerType = PlatformCALayer::LayerTypeWebLayer; 282 if (client && client->shouldUseTile Cache(this)) {283 layerType = PlatformCALayer::LayerTypePageTile CacheLayer;284 m_isPageTile CacheLayer = true;282 if (client && client->shouldUseTiledBacking(this)) { 283 layerType = PlatformCALayer::LayerTypePageTiledBackingLayer; 284 m_isPageTiledBackingLayer = true; 285 285 } 286 286 … … 1036 1036 commitLayerChangesAfterSublayers(); 1037 1037 1038 if (affectedByTransformAnimation && client() && m_layer->layerType() == PlatformCALayer::LayerTypeTile CacheLayer)1038 if (affectedByTransformAnimation && client() && m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer) 1039 1039 client()->notifyFlushBeforeDisplayRefresh(this); 1040 1040 … … 1045 1045 bool GraphicsLayerCA::platformCALayerShowRepaintCounter(PlatformCALayer* platformLayer) const 1046 1046 { 1047 // The repaint counters are painted into the TileC achetiles (which have no corresponding platform layer),1048 // so we don't want to overpaint the repaint counter when called with the TileC ache's own layer.1049 if (m_isPageTile CacheLayer && platformLayer)1047 // The repaint counters are painted into the TileController tiles (which have no corresponding platform layer), 1048 // so we don't want to overpaint the repaint counter when called with the TileController's own layer. 1049 if (m_isPageTiledBackingLayer && platformLayer) 1050 1050 return false; 1051 1051 … … 1060 1060 void GraphicsLayerCA::platformCALayerDidCreateTiles(const Vector<FloatRect>& dirtyRects) 1061 1061 { 1062 ASSERT(m_layer->usesTile CacheLayer());1062 ASSERT(m_layer->usesTiledBackingLayer()); 1063 1063 1064 1064 for (size_t i = 0; i < dirtyRects.size(); ++i) … … 1615 1615 void GraphicsLayerCA::updateVisibleRect(const FloatRect& oldVisibleRect) 1616 1616 { 1617 if (!m_layer->usesTile CacheLayer())1617 if (!m_layer->usesTiledBackingLayer()) 1618 1618 return; 1619 1619 1620 1620 FloatRect tileArea = m_visibleRect; 1621 if (m_layer->layerType() == PlatformCALayer::LayerTypeTile CacheLayer)1621 if (m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer) 1622 1622 tileArea = adjustTiledLayerVisibleRect(tiledBacking(), oldVisibleRect, m_sizeAtLastVisibleRectUpdate); 1623 1623 … … 2561 2561 void GraphicsLayerCA::getDebugBorderInfo(Color& color, float& width) const 2562 2562 { 2563 if (m_isPageTile CacheLayer) {2563 if (m_isPageTiledBackingLayer) { 2564 2564 color = Color(0, 0, 128, 128); // tile cache layer: dark blue 2565 2565 width = 0.5; … … 2634 2634 bool GraphicsLayerCA::requiresTiledLayer(float pageScaleFactor) const 2635 2635 { 2636 if (!m_drawsContent || !m_allowTiledLayer || m_isPageTile CacheLayer)2636 if (!m_drawsContent || !m_allowTiledLayer || m_isPageTiledBackingLayer) 2637 2637 return false; 2638 2638 … … 2643 2643 void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer) 2644 2644 { 2645 ASSERT(m_layer->layerType() != PlatformCALayer::LayerTypePageTile CacheLayer);2645 ASSERT(m_layer->layerType() != PlatformCALayer::LayerTypePageTiledBackingLayer); 2646 2646 ASSERT(useTiledLayer != m_usingTiledLayer); 2647 2647 RefPtr<PlatformCALayer> oldLayer = m_layer; 2648 2648 2649 m_layer = PlatformCALayer::create(useTiledLayer ? PlatformCALayer::LayerTypeTile CacheLayer : PlatformCALayer::LayerTypeWebLayer, this);2649 m_layer = PlatformCALayer::create(useTiledLayer ? PlatformCALayer::LayerTypeTiledBackingLayer : PlatformCALayer::LayerTypeWebLayer, this); 2650 2650 m_usingTiledLayer = useTiledLayer; 2651 2651 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r141036 r145148 426 426 ContentsLayerPurpose m_contentsLayerPurpose; 427 427 bool m_allowTiledLayer : 1; 428 bool m_isPageTile CacheLayer : 1;428 bool m_isPageTiledBackingLayer : 1; 429 429 430 430 Color m_contentsSolidColor; -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h
r135895 r145148 60 60 LayerTypeTransformLayer, 61 61 LayerTypeWebTiledLayer, 62 LayerTypeTile CacheLayer,63 LayerTypePageTile CacheLayer,62 LayerTypeTiledBackingLayer, 63 LayerTypePageTiledBackingLayer, 64 64 LayerTypeRootLayer, 65 65 LayerTypeCustom … … 82 82 83 83 #if PLATFORM(WIN) 84 bool usesTile CacheLayer() const { return false; }84 bool usesTiledBackingLayer() const { return false; } 85 85 #else 86 bool usesTile CacheLayer() const { return m_layerType == LayerTypePageTileCacheLayer || m_layerType == LayerTypeTileCacheLayer; }86 bool usesTiledBackingLayer() const { return m_layerType == LayerTypePageTiledBackingLayer || m_layerType == LayerTypeTiledBackingLayer; } 87 87 #endif 88 88 -
trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
r139770 r145148 39 39 #import "WebLayer.h" 40 40 #import "WebTiledLayer.h" 41 #import "WebTile CacheLayer.h"41 #import "WebTiledBackingLayer.h" 42 42 #import <objc/objc-auto.h> 43 43 #import <objc/runtime.h> … … 225 225 layerClass = [WebTiledLayer class]; 226 226 break; 227 case LayerTypeTile CacheLayer:228 case LayerTypePageTile CacheLayer:229 layerClass = [WebTile CacheLayer class];227 case LayerTypeTiledBackingLayer: 228 case LayerTypePageTiledBackingLayer: 229 layerClass = [WebTiledBackingLayer class]; 230 230 break; 231 231 case LayerTypeCustom: … … 252 252 } 253 253 254 if (usesTile CacheLayer()) {254 if (usesTiledBackingLayer()) { 255 255 m_customSublayers = adoptPtr(new PlatformCALayerList(1)); 256 CALayer* tileCacheTileContainerLayer = [static_cast<WebTile CacheLayer *>(m_layer.get()) tileContainerLayer];256 CALayer* tileCacheTileContainerLayer = [static_cast<WebTiledBackingLayer *>(m_layer.get()) tileContainerLayer]; 257 257 (*m_customSublayers)[0] = PlatformCALayer::create(tileCacheTileContainerLayer, 0); 258 258 } … … 272 272 [static_cast<WebAnimationDelegate*>(m_delegate.get()) setOwner:nil]; 273 273 274 if (usesTile CacheLayer())275 [static_cast<WebTile CacheLayer *>(m_layer.get()) invalidate];274 if (usesTiledBackingLayer()) 275 [static_cast<WebTiledBackingLayer *>(m_layer.get()) invalidate]; 276 276 } 277 277 … … 1097 1097 TiledBacking* PlatformCALayer::tiledBacking() 1098 1098 { 1099 if (!usesTile CacheLayer())1099 if (!usesTiledBackingLayer()) 1100 1100 return 0; 1101 1101 1102 WebTile CacheLayer *tileCacheLayer = static_cast<WebTileCacheLayer *>(m_layer.get());1103 return [tile CacheLayer tiledBacking];1102 WebTiledBackingLayer *tiledBackingLayer = static_cast<WebTiledBackingLayer *>(m_layer.get()); 1103 return [tiledBackingLayer tiledBacking]; 1104 1104 } 1105 1105 -
trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h
-
Property
svn:eol-style
set to
native
-
Property
svn:keywords
set to
Date Author Id Revision HeadURL
r145146 r145148 24 24 */ 25 25 26 #ifndef TileC ache_h27 #define TileC ache_h26 #ifndef TileController_h 27 #define TileController_h 28 28 29 29 #include "FloatRect.h" … … 39 39 40 40 OBJC_CLASS CALayer; 41 OBJC_CLASS WebTile CacheLayer;41 OBJC_CLASS WebTiledBackingLayer; 42 42 OBJC_CLASS WebTileLayer; 43 43 OBJC_CLASS WebTiledScrollingIndicatorLayer; … … 51 51 typedef Vector<RetainPtr<WebTileLayer> > WebTileLayerList; 52 52 53 class TileC ache: public TiledBacking {54 WTF_MAKE_NONCOPYABLE(TileC ache);53 class TileController : public TiledBacking { 54 WTF_MAKE_NONCOPYABLE(TileController); 55 55 56 56 public: 57 static PassOwnPtr<TileC ache> create(WebTileCacheLayer*);58 ~TileC ache();57 static PassOwnPtr<TileController> create(WebTiledBackingLayer*); 58 ~TileController(); 59 59 60 60 void tileCacheLayerBoundsChanged(); … … 104 104 105 105 private: 106 TileC ache(WebTileCacheLayer*);106 TileController(WebTiledBackingLayer*); 107 107 108 108 // TiledBacking member functions. … … 136 136 137 137 void scheduleTileRevalidation(double interval); 138 void tileRevalidationTimerFired(Timer<TileC ache>*);138 void tileRevalidationTimerFired(Timer<TileController>*); 139 139 140 140 void scheduleCohortRemoval(); 141 void cohortRemovalTimerFired(Timer<TileC ache>*);141 void cohortRemovalTimerFired(Timer<TileController>*); 142 142 143 143 typedef unsigned TileValidationPolicyFlags; … … 165 165 void drawRepaintCounter(WebTileLayer *, CGContextRef); 166 166 167 WebTile CacheLayer* m_tileCacheLayer;167 WebTiledBackingLayer* m_tileCacheLayer; 168 168 RetainPtr<CALayer> m_tileContainerLayer; 169 169 RetainPtr<WebTiledScrollingIndicatorLayer> m_tiledScrollingIndicatorLayer; // Used for coverage visualization. … … 176 176 typedef HashMap<TileIndex, TileInfo> TileMap; 177 177 TileMap m_tiles; 178 Timer<TileC ache> m_tileRevalidationTimer;179 Timer<TileC ache> m_cohortRemovalTimer;178 Timer<TileController> m_tileRevalidationTimer; 179 Timer<TileController> m_cohortRemovalTimer; 180 180 181 181 struct TileCohortInfo { … … 211 211 } // namespace WebCore 212 212 213 #endif // TileC ache_h213 #endif // TileController_h -
Property
svn:eol-style
set to
-
trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm
r145146 r145148 25 25 26 26 #import "config.h" 27 #import "TileC ache.h"27 #import "TileController.h" 28 28 29 29 #import "IntRect.h" … … 32 32 #import "LayerPool.h" 33 33 #import "WebLayer.h" 34 #import "WebTile CacheLayer.h"34 #import "WebTiledBackingLayer.h" 35 35 #import "WebTileLayer.h" 36 36 #import <QuartzCore/QuartzCore.h> … … 48 48 49 49 @interface WebTiledScrollingIndicatorLayer : CALayer { 50 WebCore::TileC ache* _tileCache;50 WebCore::TileController* _tileController; 51 51 CALayer *_visibleRectFrameLayer; // Owned by being a sublayer. 52 52 } 53 @property (assign) WebCore::TileC ache* tileCache;53 @property (assign) WebCore::TileController* tileController; 54 54 @property (assign) CALayer* visibleRectFrameLayer; 55 55 @end 56 56 57 57 @implementation WebTiledScrollingIndicatorLayer 58 @synthesize tileC ache = _tileCache;58 @synthesize tileController = _tileController; 59 59 @synthesize visibleRectFrameLayer = _visibleRectFrameLayer; 60 60 - (id)init … … 75 75 - (void)drawInContext:(CGContextRef)context 76 76 { 77 if (_tileC ache)78 _tileC ache->drawTileMapContents(context, [self bounds]);77 if (_tileController) 78 _tileController->drawTileMapContents(context, [self bounds]); 79 79 } 80 80 @end … … 87 87 }; 88 88 89 static const int defaultTile CacheWidth = 512;90 static const int defaultTile CacheHeight = 512;91 92 PassOwnPtr<TileC ache> TileCache::create(WebTileCacheLayer* tileCacheLayer)93 { 94 return adoptPtr(new TileC ache(tileCacheLayer));95 } 96 97 TileC ache::TileCache(WebTileCacheLayer* tileCacheLayer)89 static const int defaultTileWidth = 512; 90 static const int defaultTileHeight = 512; 91 92 PassOwnPtr<TileController> TileController::create(WebTiledBackingLayer* tileCacheLayer) 93 { 94 return adoptPtr(new TileController(tileCacheLayer)); 95 } 96 97 TileController::TileController(WebTiledBackingLayer* tileCacheLayer) 98 98 : m_tileCacheLayer(tileCacheLayer) 99 99 , m_tileContainerLayer(adoptCF([[CALayer alloc] init])) 100 , m_tileSize(defaultTile CacheWidth, defaultTileCacheHeight)101 , m_tileRevalidationTimer(this, &TileC ache::tileRevalidationTimerFired)102 , m_cohortRemovalTimer(this, &TileC ache::cohortRemovalTimerFired)100 , m_tileSize(defaultTileWidth, defaultTileHeight) 101 , m_tileRevalidationTimer(this, &TileController::tileRevalidationTimerFired) 102 , m_cohortRemovalTimer(this, &TileController::cohortRemovalTimerFired) 103 103 , m_scale(1) 104 104 , m_deviceScaleFactor(1) … … 118 118 [m_tileCacheLayer addSublayer:m_tileContainerLayer.get()]; 119 119 #ifndef NDEBUG 120 [m_tileContainerLayer.get() setName:@"TileC acheContainer Layer"];120 [m_tileContainerLayer.get() setName:@"TileController Container Layer"]; 121 121 #endif 122 122 [CATransaction commit]; 123 123 } 124 124 125 TileC ache::~TileCache()125 TileController::~TileController() 126 126 { 127 127 ASSERT(isMainThread()); … … 129 129 for (TileMap::iterator it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) { 130 130 const TileInfo& tileInfo = it->value; 131 [tileInfo.layer.get() setTileC ache:0];131 [tileInfo.layer.get() setTileController:0]; 132 132 } 133 133 134 134 if (m_tiledScrollingIndicatorLayer) 135 [m_tiledScrollingIndicatorLayer.get() setTileC ache:nil];136 } 137 138 void TileC ache::tileCacheLayerBoundsChanged()135 [m_tiledScrollingIndicatorLayer.get() setTileController:nil]; 136 } 137 138 void TileController::tileCacheLayerBoundsChanged() 139 139 { 140 140 if (m_tiles.isEmpty()) { … … 148 148 } 149 149 150 void TileC ache::setNeedsDisplay()150 void TileController::setNeedsDisplay() 151 151 { 152 152 for (TileMap::const_iterator it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) { … … 156 156 } 157 157 158 void TileC ache::setNeedsDisplayInRect(const IntRect& rect)158 void TileController::setNeedsDisplayInRect(const IntRect& rect) 159 159 { 160 160 if (m_tiles.isEmpty()) … … 187 187 } 188 188 189 void TileC ache::setTileNeedsDisplayInRect(const TileIndex& tileIndex, TileInfo& tileInfo, const IntRect& repaintRectInTileCoords, const IntRect& coverageRectInTileCoords)189 void TileController::setTileNeedsDisplayInRect(const TileIndex& tileIndex, TileInfo& tileInfo, const IntRect& repaintRectInTileCoords, const IntRect& coverageRectInTileCoords) 190 190 { 191 191 WebTileLayer* tileLayer = tileInfo.layer.get(); … … 214 214 215 215 216 void TileC ache::drawLayer(WebTileLayer *layer, CGContextRef context)216 void TileController::drawLayer(WebTileLayer *layer, CGContextRef context) 217 217 { 218 218 PlatformCALayer* platformLayer = PlatformCALayer::platformCALayer(m_tileCacheLayer); … … 232 232 } 233 233 234 void TileC ache::setScale(CGFloat scale)234 void TileController::setScale(CGFloat scale) 235 235 { 236 236 PlatformCALayer* platformLayer = PlatformCALayer::platformCALayer(m_tileCacheLayer); … … 268 268 } 269 269 270 void TileC ache::setAcceleratesDrawing(bool acceleratesDrawing)270 void TileController::setAcceleratesDrawing(bool acceleratesDrawing) 271 271 { 272 272 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 … … 285 285 } 286 286 287 void TileC ache::setTilesOpaque(bool opaque)287 void TileController::setTilesOpaque(bool opaque) 288 288 { 289 289 if (opaque == m_tilesAreOpaque) … … 298 298 } 299 299 300 void TileC ache::setVisibleRect(const FloatRect& visibleRect)300 void TileController::setVisibleRect(const FloatRect& visibleRect) 301 301 { 302 302 if (m_visibleRect == visibleRect) … … 307 307 } 308 308 309 void TileC ache::setExposedRect(const FloatRect& exposedRect)309 void TileController::setExposedRect(const FloatRect& exposedRect) 310 310 { 311 311 if (m_exposedRect == exposedRect) … … 316 316 } 317 317 318 void TileC ache::setClipsToExposedRect(bool clipsToExposedRect)318 void TileController::setClipsToExposedRect(bool clipsToExposedRect) 319 319 { 320 320 if (m_clipsToExposedRect == clipsToExposedRect) … … 328 328 } 329 329 330 void TileC ache::prepopulateRect(const FloatRect& rect)330 void TileController::prepopulateRect(const FloatRect& rect) 331 331 { 332 332 ensureTilesForRect(rect); 333 333 } 334 334 335 void TileC ache::setIsInWindow(bool isInWindow)335 void TileController::setIsInWindow(bool isInWindow) 336 336 { 337 337 if (m_isInWindow == isInWindow) … … 348 348 } 349 349 350 void TileC ache::setTileCoverage(TileCoverage coverage)350 void TileController::setTileCoverage(TileCoverage coverage) 351 351 { 352 352 if (coverage == m_tileCoverage) … … 357 357 } 358 358 359 void TileC ache::forceRepaint()359 void TileController::forceRepaint() 360 360 { 361 361 setNeedsDisplay(); 362 362 } 363 363 364 void TileC ache::setTileDebugBorderWidth(float borderWidth)364 void TileController::setTileDebugBorderWidth(float borderWidth) 365 365 { 366 366 if (m_tileDebugBorderWidth == borderWidth) … … 374 374 } 375 375 376 void TileC ache::setTileDebugBorderColor(CGColorRef borderColor)376 void TileController::setTileDebugBorderColor(CGColorRef borderColor) 377 377 { 378 378 if (m_tileDebugBorderColor == borderColor) … … 386 386 } 387 387 388 IntRect TileC ache::bounds() const388 IntRect TileController::bounds() const 389 389 { 390 390 return IntRect(IntPoint(), IntSize([m_tileCacheLayer bounds].size)); 391 391 } 392 392 393 IntRect TileC ache::rectForTileIndex(const TileIndex& tileIndex) const393 IntRect TileController::rectForTileIndex(const TileIndex& tileIndex) const 394 394 { 395 395 IntRect rect(tileIndex.x() * m_tileSize.width(), tileIndex.y() * m_tileSize.height(), m_tileSize.width(), m_tileSize.height()); … … 402 402 } 403 403 404 void TileC ache::getTileIndexRangeForRect(const IntRect& rect, TileIndex& topLeft, TileIndex& bottomRight) const404 void TileController::getTileIndexRangeForRect(const IntRect& rect, TileIndex& topLeft, TileIndex& bottomRight) const 405 405 { 406 406 IntRect clampedRect = bounds(); … … 418 418 } 419 419 420 FloatRect TileC ache::computeTileCoverageRect(const FloatRect& previousVisibleRect) const420 FloatRect TileController::computeTileCoverageRect(const FloatRect& previousVisibleRect) const 421 421 { 422 422 FloatRect visibleRect = m_visibleRect; … … 459 459 } 460 460 461 IntSize TileC ache::tileSizeForCoverageRect(const FloatRect& coverageRect) const461 IntSize TileController::tileSizeForCoverageRect(const FloatRect& coverageRect) const 462 462 { 463 463 if (m_tileCoverage & CoverageForSlowScrolling) { … … 467 467 } 468 468 469 return IntSize(defaultTile CacheWidth, defaultTileCacheHeight);470 } 471 472 void TileC ache::scheduleTileRevalidation(double interval)469 return IntSize(defaultTileWidth, defaultTileHeight); 470 } 471 472 void TileController::scheduleTileRevalidation(double interval) 473 473 { 474 474 if (m_tileRevalidationTimer.isActive() && m_tileRevalidationTimer.nextFireInterval() < interval) … … 478 478 } 479 479 480 void TileC ache::tileRevalidationTimerFired(Timer<TileCache>*)480 void TileController::tileRevalidationTimerFired(Timer<TileController>*) 481 481 { 482 482 TileValidationPolicyFlags foregroundValidationPolicy = m_aggressivelyRetainsTiles ? 0 : PruneSecondaryTiles; … … 486 486 } 487 487 488 unsigned TileC ache::blankPixelCount() const488 unsigned TileController::blankPixelCount() const 489 489 { 490 490 WebTileLayerList tiles(m_tiles.size()); … … 496 496 } 497 497 498 unsigned TileC ache::blankPixelCountForTiles(const WebTileLayerList& tiles, const FloatRect& visibleRect, const IntPoint& tileTranslation)498 unsigned TileController::blankPixelCountForTiles(const WebTileLayerList& tiles, const FloatRect& visibleRect, const IntPoint& tileTranslation) 499 499 { 500 500 Region paintedVisibleTiles; … … 516 516 } 517 517 518 static inline void queueTileForRemoval(const TileC ache::TileIndex& tileIndex, const TileCache::TileInfo& tileInfo, Vector<TileCache::TileIndex>& tilesToRemove)518 static inline void queueTileForRemoval(const TileController::TileIndex& tileIndex, const TileController::TileInfo& tileInfo, Vector<TileController::TileIndex>& tilesToRemove) 519 519 { 520 520 WebTileLayer* tileLayer = tileInfo.layer.get(); 521 521 [tileLayer removeFromSuperlayer]; 522 [tileLayer setTileC ache:0];522 [tileLayer setTileController:0]; 523 523 tilesToRemove.append(tileIndex); 524 524 } 525 525 526 void TileC ache::removeAllTiles()526 void TileController::removeAllTiles() 527 527 { 528 528 Vector<TileIndex> tilesToRemove; … … 537 537 } 538 538 539 void TileC ache::removeAllSecondaryTiles()539 void TileController::removeAllSecondaryTiles() 540 540 { 541 541 Vector<TileIndex> tilesToRemove; … … 555 555 } 556 556 557 void TileC ache::removeTilesInCohort(TileCohort cohort)557 void TileController::removeTilesInCohort(TileCohort cohort) 558 558 { 559 559 ASSERT(cohort != VisibleTileCohort); … … 574 574 } 575 575 576 void TileC ache::revalidateTiles(TileValidationPolicyFlags foregroundValidationPolicy, TileValidationPolicyFlags backgroundValidationPolicy)577 { 578 // If the underlying PlatformLayer has been destroyed, but the WebTile CacheLayer hasn't576 void TileController::revalidateTiles(TileValidationPolicyFlags foregroundValidationPolicy, TileValidationPolicyFlags backgroundValidationPolicy) 577 { 578 // If the underlying PlatformLayer has been destroyed, but the WebTiledBackingLayer hasn't 579 579 // platformLayer will be null here. 580 580 PlatformCALayer* platformLayer = PlatformCALayer::platformCALayer(m_tileCacheLayer); … … 700 700 } 701 701 702 TileC ache::TileCohort TileCache::nextTileCohort() const702 TileController::TileCohort TileController::nextTileCohort() const 703 703 { 704 704 if (!m_cohortList.isEmpty()) … … 708 708 } 709 709 710 void TileC ache::startedNewCohort(TileCohort cohort)710 void TileController::startedNewCohort(TileCohort cohort) 711 711 { 712 712 m_cohortList.append(TileCohortInfo(cohort, monotonicallyIncreasingTime())); 713 713 } 714 714 715 TileC ache::TileCohort TileCache::newestTileCohort() const715 TileController::TileCohort TileController::newestTileCohort() const 716 716 { 717 717 return m_cohortList.isEmpty() ? 0 : m_cohortList.last().cohort; 718 718 } 719 719 720 TileC ache::TileCohort TileCache::oldestTileCohort() const720 TileController::TileCohort TileController::oldestTileCohort() const 721 721 { 722 722 return m_cohortList.isEmpty() ? 0 : m_cohortList.first().cohort; 723 723 } 724 724 725 void TileC ache::scheduleCohortRemoval()725 void TileController::scheduleCohortRemoval() 726 726 { 727 727 const double cohortRemovalTimerSeconds = 1; … … 732 732 } 733 733 734 void TileC ache::cohortRemovalTimerFired(Timer<TileCache>*)734 void TileController::cohortRemovalTimerFired(Timer<TileController>*) 735 735 { 736 736 if (m_cohortList.isEmpty()) { … … 751 751 } 752 752 753 void TileC ache::ensureTilesForRect(const FloatRect& rect)753 void TileController::ensureTilesForRect(const FloatRect& rect) 754 754 { 755 755 if (m_unparentsOffscreenTiles && !m_isInWindow) … … 816 816 } 817 817 818 void TileC ache::updateTileCoverageMap()818 void TileController::updateTileCoverageMap() 819 819 { 820 820 FloatRect containerBounds = bounds(); … … 869 869 } 870 870 871 IntRect TileC ache::tileGridExtent() const871 IntRect TileController::tileGridExtent() const 872 872 { 873 873 TileIndex topLeft; … … 880 880 881 881 // Return the rect in layer coords, not tile coords. 882 IntRect TileC ache::tileCoverageRect() const882 IntRect TileController::tileCoverageRect() const 883 883 { 884 884 IntRect coverageRectInLayerCoords(m_primaryTileCoverageRect); … … 887 887 } 888 888 889 CALayer *TileC ache::tiledScrollingIndicatorLayer()889 CALayer *TileController::tiledScrollingIndicatorLayer() 890 890 { 891 891 if (!m_tiledScrollingIndicatorLayer) { 892 892 m_tiledScrollingIndicatorLayer = [WebTiledScrollingIndicatorLayer layer]; 893 [m_tiledScrollingIndicatorLayer.get() setTileC ache:this];893 [m_tiledScrollingIndicatorLayer.get() setTileController:this]; 894 894 [m_tiledScrollingIndicatorLayer.get() setOpacity:0.75]; 895 895 [m_tiledScrollingIndicatorLayer.get() setAnchorPoint:CGPointZero]; … … 903 903 } 904 904 905 void TileC ache::setScrollingModeIndication(ScrollingModeIndication scrollingMode)905 void TileController::setScrollingModeIndication(ScrollingModeIndication scrollingMode) 906 906 { 907 907 if (scrollingMode == m_indicatorMode) … … 914 914 } 915 915 916 WebTileLayer* TileC ache::tileLayerAtIndex(const TileIndex& index) const916 WebTileLayer* TileController::tileLayerAtIndex(const TileIndex& index) const 917 917 { 918 918 return m_tiles.get(index).layer.get(); 919 919 } 920 920 921 RetainPtr<WebTileLayer> TileC ache::createTileLayer(const IntRect& tileRect)921 RetainPtr<WebTileLayer> TileController::createTileLayer(const IntRect& tileRect) 922 922 { 923 923 RetainPtr<WebTileLayer> layer = LayerPool::sharedPool()->takeLayerWithSize(tileRect.size()); … … 931 931 [layer.get() setAnchorPoint:CGPointZero]; 932 932 [layer.get() setFrame:tileRect]; 933 [layer.get() setTileC ache:this];933 [layer.get() setTileController:this]; 934 934 [layer.get() setBorderColor:m_tileDebugBorderColor.get()]; 935 935 [layer.get() setBorderWidth:m_tileDebugBorderWidth]; … … 948 948 } 949 949 950 bool TileC ache::shouldShowRepaintCounters() const950 bool TileController::shouldShowRepaintCounters() const 951 951 { 952 952 PlatformCALayer* platformLayer = PlatformCALayer::platformCALayer(m_tileCacheLayer); … … 962 962 } 963 963 964 void TileC ache::drawRepaintCounter(WebTileLayer *layer, CGContextRef context)964 void TileController::drawRepaintCounter(WebTileLayer *layer, CGContextRef context) 965 965 { 966 966 unsigned paintCount = [layer incrementPaintCount]; … … 1001 1001 } 1002 1002 1003 void TileC ache::drawTileMapContents(CGContextRef context, CGRect layerBounds)1003 void TileController::drawTileMapContents(CGContextRef context, CGRect layerBounds) 1004 1004 { 1005 1005 CGContextSetRGBFillColor(context, 0.3, 0.3, 0.3, 1); -
trunk/Source/WebCore/platform/graphics/ca/mac/WebTileLayer.h
r136774 r145148 28 28 29 29 namespace WebCore { 30 class TileCache;30 class TileController; 31 31 } 32 32 33 33 @interface WebTileLayer : CALayer { 34 WebCore::TileC ache* _tileCache;34 WebCore::TileController* _tileController; 35 35 unsigned _paintCount; 36 36 } 37 37 38 - (void)setTileC ache:(WebCore::TileCache*)tileCache;38 - (void)setTileController:(WebCore::TileController*)tileController; 39 39 - (void)resetPaintCount; 40 40 - (unsigned)incrementPaintCount; -
trunk/Source/WebCore/platform/graphics/ca/mac/WebTileLayer.mm
r143537 r145148 27 27 #import "WebTileLayer.h" 28 28 29 #import "TileC ache.h"29 #import "TileController.h" 30 30 #import <wtf/CurrentTime.h> 31 31 #import <wtf/UnusedParam.h> … … 49 49 - (void)drawInContext:(CGContextRef)context 50 50 { 51 if (_tileC ache) {52 _tileC ache->drawLayer(self, context);51 if (_tileController) { 52 _tileController->drawLayer(self, context); 53 53 54 if (static_cast<TiledBacking*>(_tileC ache)->scrollingPerformanceLoggingEnabled())54 if (static_cast<TiledBacking*>(_tileController)->scrollingPerformanceLoggingEnabled()) 55 55 [self logFilledFreshTile]; 56 56 } 57 57 } 58 58 59 - (void)setTileC ache:(WebCore::TileCache*)tileCache59 - (void)setTileController:(WebCore::TileController*)tileController 60 60 { 61 _tileC ache = tileCache;61 _tileController = tileController; 62 62 } 63 63 … … 80 80 { 81 81 FloatRect visiblePart([self frame]); 82 visiblePart.intersect(_tileC ache->visibleRect());82 visiblePart.intersect(_tileController->visibleRect()); 83 83 84 84 if ([self paintCount] == 1 && !visiblePart.isEmpty()) 85 WTFLogAlways("SCROLLING: Filled visible fresh tile. Time: %f Unfilled Pixels: %u\n", WTF::monotonicallyIncreasingTime(), _tileC ache->blankPixelCount());85 WTFLogAlways("SCROLLING: Filled visible fresh tile. Time: %f Unfilled Pixels: %u\n", WTF::monotonicallyIncreasingTime(), _tileController->blankPixelCount()); 86 86 } 87 87 -
trunk/Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h
-
Property
svn:keywords
set to
Date Author Id Revision HeadURL
r145146 r145148 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 #ifndef WebTile CacheLayer_h27 #define WebTile CacheLayer_h25 26 #ifndef WebTiledBackingLayer_h 27 #define WebTiledBackingLayer_h 28 28 29 29 #import <QuartzCore/QuartzCore.h> … … 31 31 32 32 namespace WebCore { 33 34 class TileCache;35 33 class IntRect; 34 class TileController; 35 class TiledBacking; 36 36 } 37 37 38 @interface WebTile CacheLayer : CALayer {39 OwnPtr<WebCore::TileC ache> _tileCache;38 @interface WebTiledBackingLayer : CALayer { 39 OwnPtr<WebCore::TileController> _tileController; 40 40 } 41 41 … … 46 46 @end 47 47 48 #endif // WebTile CacheLayer_h48 #endif // WebTiledBackingLayer_h -
Property
svn:keywords
set to
-
trunk/Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm
r145146 r145148 25 25 26 26 #import "config.h" 27 #import "WebTile CacheLayer.h"27 #import "WebTiledBackingLayer.h" 28 28 29 29 #import "IntRect.h" 30 #import "TileC ache.h"30 #import "TileController.h" 31 31 #import <wtf/MainThread.h> 32 32 33 33 using namespace WebCore; 34 34 35 @implementation WebTile CacheLayer35 @implementation WebTiledBackingLayer 36 36 37 37 - (id)init … … 41 41 return nil; 42 42 43 _tileC ache = TileCache::create(self);43 _tileController = TileController::create(self); 44 44 #ifndef NDEBUG 45 [self setName:@"WebTile CacheLayer"];45 [self setName:@"WebTiledBackingLayer"]; 46 46 #endif 47 47 return self; … … 50 50 - (void)dealloc 51 51 { 52 ASSERT(!_tileC ache);52 ASSERT(!_tileController); 53 53 54 54 [super dealloc]; … … 75 75 [super setBounds:bounds]; 76 76 77 _tileC ache->tileCacheLayerBoundsChanged();77 _tileController->tileCacheLayerBoundsChanged(); 78 78 } 79 79 80 80 - (void)setOpaque:(BOOL)opaque 81 81 { 82 _tileC ache->setTilesOpaque(opaque);82 _tileController->setTilesOpaque(opaque); 83 83 } 84 84 85 85 - (BOOL)isOpaque 86 86 { 87 return _tileC ache->tilesAreOpaque();87 return _tileController->tilesAreOpaque(); 88 88 } 89 89 90 90 - (void)setNeedsDisplay 91 91 { 92 _tileC ache->setNeedsDisplay();92 _tileController->setNeedsDisplay(); 93 93 } 94 94 95 95 - (void)setNeedsDisplayInRect:(CGRect)rect 96 96 { 97 _tileC ache->setNeedsDisplayInRect(enclosingIntRect(rect));97 _tileController->setNeedsDisplayInRect(enclosingIntRect(rect)); 98 98 } 99 99 100 100 - (void)setAcceleratesDrawing:(BOOL)acceleratesDrawing 101 101 { 102 _tileC ache->setAcceleratesDrawing(acceleratesDrawing);102 _tileController->setAcceleratesDrawing(acceleratesDrawing); 103 103 } 104 104 105 105 - (BOOL)acceleratesDrawing 106 106 { 107 return _tileC ache->acceleratesDrawing();107 return _tileController->acceleratesDrawing(); 108 108 } 109 109 110 110 - (void)setContentsScale:(CGFloat)contentsScale 111 111 { 112 _tileC ache->setScale(contentsScale);112 _tileController->setScale(contentsScale); 113 113 } 114 114 115 115 - (CALayer *)tileContainerLayer 116 116 { 117 return _tileC ache->tileContainerLayer();117 return _tileController->tileContainerLayer(); 118 118 } 119 119 120 120 - (WebCore::TiledBacking*)tiledBacking 121 121 { 122 return _tileC ache.get();122 return _tileController.get(); 123 123 } 124 124 … … 126 126 { 127 127 ASSERT(isMainThread()); 128 ASSERT(_tileC ache);129 _tileC ache= nullptr;128 ASSERT(_tileController); 129 _tileController = nullptr; 130 130 } 131 131 132 132 - (void)setBorderColor:(CGColorRef)borderColor 133 133 { 134 _tileC ache->setTileDebugBorderColor(borderColor);134 _tileController->setTileDebugBorderColor(borderColor); 135 135 } 136 136 … … 138 138 { 139 139 // Tiles adjoin, so halve the border width. 140 _tileC ache->setTileDebugBorderWidth(borderWidth / 2);140 _tileController->setTileDebugBorderWidth(borderWidth / 2); 141 141 } 142 142 -
trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm
r137915 r145148 134 134 int repaintCount = layerContents->platformCALayerIncrementRepaintCount(); 135 135 136 if (!platformLayer->usesTile CacheLayer() && layerContents && layerContents->platformCALayerShowRepaintCounter(platformLayer)) {136 if (!platformLayer->usesTiledBackingLayer() && layerContents && layerContents->platformCALayerShowRepaintCounter(platformLayer)) { 137 137 bool isTiledLayer = [layer isKindOfClass:[CATiledLayer class]]; 138 138 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r145067 r145148 146 146 147 147 tiledBacking->setScrollingPerformanceLoggingEnabled(frame->settings() && frame->settings()->scrollingPerformanceLoggingEnabled()); 148 adjustTile CacheCoverage();148 adjustTiledBackingCoverage(); 149 149 } 150 150 } … … 185 185 } 186 186 187 bool RenderLayerBacking::shouldUseTile Cache(const GraphicsLayer*) const187 bool RenderLayerBacking::shouldUseTiledBacking(const GraphicsLayer*) const 188 188 { 189 189 return m_usingTiledCacheLayer && m_creatingPrimaryGraphicsLayer; … … 195 195 } 196 196 197 void RenderLayerBacking::adjustTile CacheCoverage()197 void RenderLayerBacking::adjustTiledBackingCoverage() 198 198 { 199 199 if (!m_usingTiledCacheLayer) … … 275 275 276 276 // The call to createGraphicsLayer ends calling back into here as 277 // a GraphicsLayerClient to ask if it shouldUseTile Cache(). We only want277 // a GraphicsLayerClient to ask if it shouldUseTiledBacking(). We only want 278 278 // the tile cache on our main layer. This is pretty ugly, but saves us from 279 279 // exposing the API to all clients. … … 284 284 285 285 if (m_usingTiledCacheLayer) 286 m_childContainmentLayer = createGraphicsLayer("Tile CacheFlattening Layer");286 m_childContainmentLayer = createGraphicsLayer("TiledBacking Flattening Layer"); 287 287 288 288 if (m_isMainFrameRenderViewLayer) { -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r141039 r145148 148 148 bool hasUnpositionedOverflowControlsLayers() const; 149 149 150 bool usingTile Cache() const { return m_usingTiledCacheLayer; }150 bool usingTiledBacking() const { return m_usingTiledCacheLayer; } 151 151 TiledBacking* tiledBacking() const; 152 void adjustTile CacheCoverage();152 void adjustTiledBackingCoverage(); 153 153 154 154 void updateDebugIndicators(bool showBorder, bool showRepaintCounter); 155 155 156 156 // GraphicsLayerClient interface 157 virtual bool shouldUseTile Cache(const GraphicsLayer*) const OVERRIDE;157 virtual bool shouldUseTiledBacking(const GraphicsLayer*) const OVERRIDE; 158 158 virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime) OVERRIDE; 159 159 virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE; … … 261 261 bool shouldClipCompositedBounds() const; 262 262 263 bool hasTile CacheFlatteningLayer() const { return (m_childContainmentLayer && m_usingTiledCacheLayer); }263 bool hasTiledBackingFlatteningLayer() const { return (m_childContainmentLayer && m_usingTiledCacheLayer); } 264 264 GraphicsLayer* tileCacheFlatteningLayer() const { return m_usingTiledCacheLayer ? m_childContainmentLayer.get() : 0; } 265 265 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r145067 r145148 1237 1237 RenderLayerBacking* renderViewBacking = m_renderView->layer()->backing(); 1238 1238 if (renderViewBacking) 1239 renderViewBacking->adjustTile CacheCoverage();1239 renderViewBacking->adjustTiledBackingCoverage(); 1240 1240 } 1241 1241 … … 1243 1243 { 1244 1244 RenderLayerBacking* renderViewBacking = m_renderView->layer()->backing(); 1245 if (renderViewBacking && renderViewBacking->usingTile Cache())1245 if (renderViewBacking && renderViewBacking->usingTiledBacking()) 1246 1246 setCompositingLayersNeedRebuild(); 1247 1247 } … … 2274 2274 { 2275 2275 RenderLayerBacking* renderViewBacking = m_renderView->layer()->backing(); 2276 return renderViewBacking && renderViewBacking->usingTile Cache();2276 return renderViewBacking && renderViewBacking->usingTiledBacking(); 2277 2277 } 2278 2278
Note: See TracChangeset
for help on using the changeset viewer.