Changeset 145148 in webkit


Ignore:
Timestamp:
Mar 7, 2013 3:54:13 PM (11 years ago)
Author:
Simon Fraser
Message:

Rename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
https://bugs.webkit.org/show_bug.cgi?id=111779

Reviewed by Tim Horton.

"TileCache" was a name conflict in downstream code, so rename it to TileController.
The layer that has a TileController is now a WebTiledBackingLayer (which fits with
the TiledBacking API that TileController exposes).

Also renamed the flags in PlatformCALayer to match.

Rename only, no behavior change.

  • WebCore.xcodeproj/project.pbxproj:
  • page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:

(WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):

  • platform/graphics/GraphicsLayerClient.h:

(WebCore::GraphicsLayerClient::shouldUseTiledBacking):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
(WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
(WebCore::GraphicsLayerCA::updateVisibleRect):
(WebCore::GraphicsLayerCA::getDebugBorderInfo):
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:

(WebCore::PlatformCALayer::usesTiledBackingLayer):

  • platform/graphics/ca/mac/PlatformCALayerMac.mm:

(PlatformCALayer::PlatformCALayer):
(PlatformCALayer::~PlatformCALayer):
(PlatformCALayer::tiledBacking):

  • platform/graphics/ca/mac/TileController.h: Renamed from Source/WebCore/platform/graphics/ca/mac/TileCache.h.
  • platform/graphics/ca/mac/WebTileLayer.h:

(TileController):

  • platform/graphics/ca/mac/WebTileLayer.mm:

(-[WebTileLayer drawInContext:]):
(-[WebTileLayer setTileController:WebCore::]):
(-[WebTileLayer logFilledFreshTile]):

  • platform/graphics/ca/mac/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.h.
  • platform/graphics/ca/mac/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.mm.
  • platform/graphics/mac/WebLayer.mm:

(drawLayerContents):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::shouldUseTiledBacking):
(WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):

  • rendering/RenderLayerBacking.h:

(WebCore::RenderLayerBacking::usingTiledBacking):
(RenderLayerBacking):
(WebCore::RenderLayerBacking::hasTiledBackingFlatteningLayer):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::frameViewDidLayout):
(WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
(WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):

Location:
trunk/Source/WebCore
Files:
14 edited
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r145142 r145148  
     12013-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
    1622013-03-07  Alexey Proskuryakov  <ap@apple.com>
    263
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r145061 r145148  
    262262                0F580CFF0F12DE9B0051D689 /* RenderLayerBacking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */; settings = {ATTRIBUTES = (Private, ); }; };
    263263                0F580D000F12DE9B0051D689 /* RenderLayerBacking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F580CFC0F12DE9B0051D689 /* RenderLayerBacking.cpp */; };
    264                 0F580FA31496939100FB5BD8 /* WebTileCacheLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580FA11496939100FB5BD8 /* WebTileCacheLayer.h */; };
    265                 0F580FA41496939100FB5BD8 /* WebTileCacheLayer.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 */; };
    266266                0F580FAF149800D400FB5BD8 /* AnimationUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580FAE149800D400FB5BD8 /* AnimationUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
    267267                0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */; };
     
    516516                1A98956B0AA78F80005EF5EF /* KURLCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A98956A0AA78F80005EF5EF /* KURLCFNet.cpp */; };
    517517                1AA21250163F0DA80000E63F /* AtomicStringCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA2124F163F0DA80000E63F /* AtomicStringCF.cpp */; };
    518                 1AA7160A149BC4DB0016EC19 /* TileCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA71608149BC4DA0016EC19 /* TileCache.mm */; };
    519                 1AA7160B149BC4DB0016EC19 /* TileCache.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 */; };
    520520                1AA7161E149BF2FA0016EC19 /* WebTileLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA7161C149BF2FA0016EC19 /* WebTileLayer.mm */; };
    521521                1AA84F04143BA7BD0051D153 /* ScrollElasticityController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA84F02143BA7BD0051D153 /* ScrollElasticityController.mm */; };
     
    75827582                0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderLayerBacking.h; sourceTree = "<group>"; };
    75837583                0F580CFC0F12DE9B0051D689 /* RenderLayerBacking.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLayerBacking.cpp; sourceTree = "<group>"; };
    7584                 0F580FA11496939100FB5BD8 /* WebTileCacheLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebTileCacheLayer.h; path = ca/mac/WebTileCacheLayer.h; sourceTree = "<group>"; };
    7585                 0F580FA21496939100FB5BD8 /* WebTileCacheLayer.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>"; };
    75867586                0F580FAE149800D400FB5BD8 /* AnimationUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationUtilities.h; path = animation/AnimationUtilities.h; sourceTree = "<group>"; };
    75877587                0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderEmbeddedObject.cpp; sourceTree = "<group>"; };
     
    78697869                1A98956A0AA78F80005EF5EF /* KURLCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = KURLCFNet.cpp; sourceTree = "<group>"; };
    78707870                1AA2124F163F0DA80000E63F /* AtomicStringCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicStringCF.cpp; sourceTree = "<group>"; };
    7871                 1AA71608149BC4DA0016EC19 /* TileCache.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TileCache.mm; path = ca/mac/TileCache.mm; sourceTree = "<group>"; };
    7872                 1AA71609149BC4DB0016EC19 /* TileCache.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>"; };
    78737873                1AA7161C149BF2FA0016EC19 /* WebTileLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebTileLayer.mm; path = ca/mac/WebTileLayer.mm; sourceTree = "<group>"; };
    78747874                1AA71625149BFFB20016EC19 /* WebTileLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebTileLayer.h; path = ca/mac/WebTileLayer.h; sourceTree = "<group>"; };
     
    95739573                7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowFocusAllowedIndicator.h; sourceTree = "<group>"; };
    95749574                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>"; };
    95779577                7EE6844C12D26E3800E79415 /* AuthenticationCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticationCF.cpp; sourceTree = "<group>"; };
    95789578                7EE6844D12D26E3800E79415 /* AuthenticationCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthenticationCF.h; sourceTree = "<group>"; };
     
    1588915889                                4958781F12A57DDF007238AC /* PlatformCAAnimationMac.mm */,
    1589015890                                4958782012A57DDF007238AC /* PlatformCALayerMac.mm */,
    15891                                 1AA71609149BC4DB0016EC19 /* TileCache.h */,
    15892                                 1AA71608149BC4DA0016EC19 /* TileCache.mm */,
    15893                                 0F580FA11496939100FB5BD8 /* WebTileCacheLayer.h */,
    15894                                 0F580FA21496939100FB5BD8 /* WebTileCacheLayer.mm */,
     15891                                1AA71609149BC4DB0016EC19 /* TileController.h */,
     15892                                1AA71608149BC4DA0016EC19 /* TileController.mm */,
     15893                                0F580FA11496939100FB5BD8 /* WebTiledBackingLayer.h */,
     15894                                0F580FA21496939100FB5BD8 /* WebTiledBackingLayer.mm */,
    1589515895                                1AA71625149BFFB20016EC19 /* WebTileLayer.h */,
    1589615896                                1AA7161C149BF2FA0016EC19 /* WebTileLayer.mm */,
     
    2645926459                                E1FF57A30F01255B00891EBB /* ThreadGlobalData.h in Headers */,
    2646026460                                185BCF290F3279CE000EA262 /* ThreadTimers.h in Headers */,
    26461                                 1AA7160B149BC4DB0016EC19 /* TileCache.h in Headers */,
     26461                                1AA7160B149BC4DB0016EC19 /* TileController.h in Headers */,
    2646226462                                1AF89A421518FDEA00E547B5 /* TiledBacking.h in Headers */,
    2646326463                                498770F31242C535002226BA /* TilingData.h in Headers */,
     
    2659926599                                97AABD2914FA09D5007457AE /* WebSocketHandshakeRequest.h in Headers */,
    2660026600                                97AABD2B14FA09D5007457AE /* WebSocketHandshakeResponse.h in Headers */,
    26601                                 0F580FA31496939100FB5BD8 /* WebTileCacheLayer.h in Headers */,
     26601                                0F580FA31496939100FB5BD8 /* WebTiledBackingLayer.h in Headers */,
    2660226602                                0FCF332D0F2B9A25004B6795 /* WebTiledLayer.h in Headers */,
    2660326603                                CD82030A1395AB6A00F956C6 /* WebVideoFullscreenController.h in Headers */,
     
    2669226692                                7E66E23416D6EB6C00F7E7FF /* WebGLCompressedTextureATC.h in Headers */,
    2669326693                                7EA30F6A16DFFE7500257D0B /* JSWebGLCompressedTextureATC.h in Headers */,
    26694                                 2D8287F716E4A0380086BD00 /* HitTestLocation.h in Headers */,
     26694                                2D8287F716E4A0380086BD00 /* HitTestLocation.h in Headers */,
    2669526695                        );
    2669626696                        runOnlyForDeploymentPostprocessing = 0;
     
    2969229692                                E1FF57A60F01256B00891EBB /* ThreadGlobalData.cpp in Sources */,
    2969329693                                185BCF280F3279CE000EA262 /* ThreadTimers.cpp in Sources */,
    29694                                 1AA7160A149BC4DB0016EC19 /* TileCache.mm in Sources */,
     29694                                1AA7160A149BC4DB0016EC19 /* TileController.mm in Sources */,
    2969529695                                498770F21242C535002226BA /* TilingData.cpp in Sources */,
    2969629696                                F55B3DDB1251F12D003EF269 /* TimeInputType.cpp in Sources */,
     
    2981029810                                97AABD2814FA09D5007457AE /* WebSocketHandshakeRequest.cpp in Sources */,
    2981129811                                97AABD2A14FA09D5007457AE /* WebSocketHandshakeResponse.cpp in Sources */,
    29812                                 0F580FA41496939100FB5BD8 /* WebTileCacheLayer.mm in Sources */,
     29812                                0F580FA41496939100FB5BD8 /* WebTiledBackingLayer.mm in Sources */,
    2981329813                                0FCF332C0F2B9A25004B6795 /* WebTiledLayer.mm in Sources */,
    2981429814                                1AA7161E149BF2FA0016EC19 /* WebTileLayer.mm in Sources */,
     
    2989529895                                7E66E23316D6EB6C00F7E7FF /* WebGLCompressedTextureATC.cpp in Sources */,
    2989629896                                7EA30F6916DFFE7500257D0B /* JSWebGLCompressedTextureATC.cpp in Sources */,
    29897                                 2D8287F616E4A0380086BD00 /* HitTestLocation.cpp in Sources */,
     29897                                2D8287F616E4A0380086BD00 /* HitTestLocation.cpp in Sources */,
    2989829898                        );
    2989929899                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm

    r143418 r145148  
    3535#include "ScrollingStateTree.h"
    3636#include "Settings.h"
    37 #include "TileCache.h"
     37#include "TileController.h"
    3838#include "WebTileLayer.h"
    3939
     
    383383
    384384    IntPoint scrollPosition = this->scrollPosition();
    385     unsigned unfilledArea = TileCache::blankPixelCountForTiles(tiles, viewportRect(), IntPoint(-scrollPosition.x(), -scrollPosition.y()));
     385    unsigned unfilledArea = TileController::blankPixelCountForTiles(tiles, viewportRect(), IntPoint(-scrollPosition.x(), -scrollPosition.y()));
    386386
    387387    if (unfilledArea || m_lastScrollHadUnfilledPixels)
  • trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h

    r145067 r145148  
    6060    virtual ~GraphicsLayerClient() {}
    6161
    62     virtual bool shouldUseTileCache(const GraphicsLayer*) const { return false; }
     62    virtual bool shouldUseTiledBacking(const GraphicsLayer*) const { return false; }
    6363   
    6464    // Callback for when hardware-accelerated animation started.
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r143537 r145148  
    276276    , m_contentsLayerPurpose(NoContentsLayer)
    277277    , m_allowTiledLayer(true)
    278     , m_isPageTileCacheLayer(false)
     278    , m_isPageTiledBackingLayer(false)
    279279    , m_uncommittedChanges(0)
    280280{
    281281    PlatformCALayer::LayerType layerType = PlatformCALayer::LayerTypeWebLayer;
    282     if (client && client->shouldUseTileCache(this)) {
    283         layerType = PlatformCALayer::LayerTypePageTileCacheLayer;
    284         m_isPageTileCacheLayer = true;
     282    if (client && client->shouldUseTiledBacking(this)) {
     283        layerType = PlatformCALayer::LayerTypePageTiledBackingLayer;
     284        m_isPageTiledBackingLayer = true;
    285285    }
    286286
     
    10361036    commitLayerChangesAfterSublayers();
    10371037
    1038     if (affectedByTransformAnimation && client() && m_layer->layerType() == PlatformCALayer::LayerTypeTileCacheLayer)
     1038    if (affectedByTransformAnimation && client() && m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer)
    10391039        client()->notifyFlushBeforeDisplayRefresh(this);
    10401040
     
    10451045bool GraphicsLayerCA::platformCALayerShowRepaintCounter(PlatformCALayer* platformLayer) const
    10461046{
    1047     // The repaint counters are painted into the TileCache tiles (which have no corresponding platform layer),
    1048     // so we don't want to overpaint the repaint counter when called with the TileCache's own layer.
    1049     if (m_isPageTileCacheLayer && 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)
    10501050        return false;
    10511051   
     
    10601060void GraphicsLayerCA::platformCALayerDidCreateTiles(const Vector<FloatRect>& dirtyRects)
    10611061{
    1062     ASSERT(m_layer->usesTileCacheLayer());
     1062    ASSERT(m_layer->usesTiledBackingLayer());
    10631063
    10641064    for (size_t i = 0; i < dirtyRects.size(); ++i)
     
    16151615void GraphicsLayerCA::updateVisibleRect(const FloatRect& oldVisibleRect)
    16161616{
    1617     if (!m_layer->usesTileCacheLayer())
     1617    if (!m_layer->usesTiledBackingLayer())
    16181618        return;
    16191619
    16201620    FloatRect tileArea = m_visibleRect;
    1621     if (m_layer->layerType() == PlatformCALayer::LayerTypeTileCacheLayer)
     1621    if (m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer)
    16221622        tileArea = adjustTiledLayerVisibleRect(tiledBacking(), oldVisibleRect, m_sizeAtLastVisibleRectUpdate);
    16231623
     
    25612561void GraphicsLayerCA::getDebugBorderInfo(Color& color, float& width) const
    25622562{
    2563     if (m_isPageTileCacheLayer) {
     2563    if (m_isPageTiledBackingLayer) {
    25642564        color = Color(0, 0, 128, 128); // tile cache layer: dark blue
    25652565        width = 0.5;
     
    26342634bool GraphicsLayerCA::requiresTiledLayer(float pageScaleFactor) const
    26352635{
    2636     if (!m_drawsContent || !m_allowTiledLayer || m_isPageTileCacheLayer)
     2636    if (!m_drawsContent || !m_allowTiledLayer || m_isPageTiledBackingLayer)
    26372637        return false;
    26382638
     
    26432643void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer)
    26442644{
    2645     ASSERT(m_layer->layerType() != PlatformCALayer::LayerTypePageTileCacheLayer);
     2645    ASSERT(m_layer->layerType() != PlatformCALayer::LayerTypePageTiledBackingLayer);
    26462646    ASSERT(useTiledLayer != m_usingTiledLayer);
    26472647    RefPtr<PlatformCALayer> oldLayer = m_layer;
    26482648   
    2649     m_layer = PlatformCALayer::create(useTiledLayer ? PlatformCALayer::LayerTypeTileCacheLayer : PlatformCALayer::LayerTypeWebLayer, this);
     2649    m_layer = PlatformCALayer::create(useTiledLayer ? PlatformCALayer::LayerTypeTiledBackingLayer : PlatformCALayer::LayerTypeWebLayer, this);
    26502650    m_usingTiledLayer = useTiledLayer;
    26512651   
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r141036 r145148  
    426426    ContentsLayerPurpose m_contentsLayerPurpose;
    427427    bool m_allowTiledLayer : 1;
    428     bool m_isPageTileCacheLayer : 1;
     428    bool m_isPageTiledBackingLayer : 1;
    429429   
    430430    Color m_contentsSolidColor;
  • trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h

    r135895 r145148  
    6060        LayerTypeTransformLayer,
    6161        LayerTypeWebTiledLayer,
    62         LayerTypeTileCacheLayer,
    63         LayerTypePageTileCacheLayer,
     62        LayerTypeTiledBackingLayer,
     63        LayerTypePageTiledBackingLayer,
    6464        LayerTypeRootLayer,
    6565        LayerTypeCustom
     
    8282
    8383#if PLATFORM(WIN)
    84     bool usesTileCacheLayer() const { return false; }
     84    bool usesTiledBackingLayer() const { return false; }
    8585#else
    86     bool usesTileCacheLayer() const { return m_layerType == LayerTypePageTileCacheLayer || m_layerType == LayerTypeTileCacheLayer; }
     86    bool usesTiledBackingLayer() const { return m_layerType == LayerTypePageTiledBackingLayer || m_layerType == LayerTypeTiledBackingLayer; }
    8787#endif
    8888
  • trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm

    r139770 r145148  
    3939#import "WebLayer.h"
    4040#import "WebTiledLayer.h"
    41 #import "WebTileCacheLayer.h"
     41#import "WebTiledBackingLayer.h"
    4242#import <objc/objc-auto.h>
    4343#import <objc/runtime.h>
     
    225225                layerClass = [WebTiledLayer class];
    226226                break;
    227             case LayerTypeTileCacheLayer:
    228             case LayerTypePageTileCacheLayer:
    229                 layerClass = [WebTileCacheLayer class];
     227            case LayerTypeTiledBackingLayer:
     228            case LayerTypePageTiledBackingLayer:
     229                layerClass = [WebTiledBackingLayer class];
    230230                break;
    231231            case LayerTypeCustom:
     
    252252    }
    253253   
    254     if (usesTileCacheLayer()) {
     254    if (usesTiledBackingLayer()) {
    255255        m_customSublayers = adoptPtr(new PlatformCALayerList(1));
    256         CALayer* tileCacheTileContainerLayer = [static_cast<WebTileCacheLayer *>(m_layer.get()) tileContainerLayer];
     256        CALayer* tileCacheTileContainerLayer = [static_cast<WebTiledBackingLayer *>(m_layer.get()) tileContainerLayer];
    257257        (*m_customSublayers)[0] = PlatformCALayer::create(tileCacheTileContainerLayer, 0);
    258258    }
     
    272272    [static_cast<WebAnimationDelegate*>(m_delegate.get()) setOwner:nil];
    273273
    274     if (usesTileCacheLayer())
    275         [static_cast<WebTileCacheLayer *>(m_layer.get()) invalidate];
     274    if (usesTiledBackingLayer())
     275        [static_cast<WebTiledBackingLayer *>(m_layer.get()) invalidate];
    276276}
    277277
     
    10971097TiledBacking* PlatformCALayer::tiledBacking()
    10981098{
    1099     if (!usesTileCacheLayer())
     1099    if (!usesTiledBackingLayer())
    11001100        return 0;
    11011101
    1102     WebTileCacheLayer *tileCacheLayer = static_cast<WebTileCacheLayer *>(m_layer.get());
    1103     return [tileCacheLayer tiledBacking];
     1102    WebTiledBackingLayer *tiledBackingLayer = static_cast<WebTiledBackingLayer *>(m_layer.get());
     1103    return [tiledBackingLayer tiledBacking];
    11041104}
    11051105
  • 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  
    2424 */
    2525
    26 #ifndef TileCache_h
    27 #define TileCache_h
     26#ifndef TileController_h
     27#define TileController_h
    2828
    2929#include "FloatRect.h"
     
    3939
    4040OBJC_CLASS CALayer;
    41 OBJC_CLASS WebTileCacheLayer;
     41OBJC_CLASS WebTiledBackingLayer;
    4242OBJC_CLASS WebTileLayer;
    4343OBJC_CLASS WebTiledScrollingIndicatorLayer;
     
    5151typedef Vector<RetainPtr<WebTileLayer> > WebTileLayerList;
    5252
    53 class TileCache : public TiledBacking {
    54     WTF_MAKE_NONCOPYABLE(TileCache);
     53class TileController : public TiledBacking {
     54    WTF_MAKE_NONCOPYABLE(TileController);
    5555
    5656public:
    57     static PassOwnPtr<TileCache> create(WebTileCacheLayer*);
    58     ~TileCache();
     57    static PassOwnPtr<TileController> create(WebTiledBackingLayer*);
     58    ~TileController();
    5959
    6060    void tileCacheLayerBoundsChanged();
     
    104104
    105105private:
    106     TileCache(WebTileCacheLayer*);
     106    TileController(WebTiledBackingLayer*);
    107107
    108108    // TiledBacking member functions.
     
    136136
    137137    void scheduleTileRevalidation(double interval);
    138     void tileRevalidationTimerFired(Timer<TileCache>*);
     138    void tileRevalidationTimerFired(Timer<TileController>*);
    139139
    140140    void scheduleCohortRemoval();
    141     void cohortRemovalTimerFired(Timer<TileCache>*);
     141    void cohortRemovalTimerFired(Timer<TileController>*);
    142142   
    143143    typedef unsigned TileValidationPolicyFlags;
     
    165165    void drawRepaintCounter(WebTileLayer *, CGContextRef);
    166166
    167     WebTileCacheLayer* m_tileCacheLayer;
     167    WebTiledBackingLayer* m_tileCacheLayer;
    168168    RetainPtr<CALayer> m_tileContainerLayer;
    169169    RetainPtr<WebTiledScrollingIndicatorLayer> m_tiledScrollingIndicatorLayer; // Used for coverage visualization.
     
    176176    typedef HashMap<TileIndex, TileInfo> TileMap;
    177177    TileMap m_tiles;
    178     Timer<TileCache> m_tileRevalidationTimer;
    179     Timer<TileCache> m_cohortRemovalTimer;
     178    Timer<TileController> m_tileRevalidationTimer;
     179    Timer<TileController> m_cohortRemovalTimer;
    180180
    181181    struct TileCohortInfo {
     
    211211} // namespace WebCore
    212212
    213 #endif // TileCache_h
     213#endif // TileController_h
  • trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm

    r145146 r145148  
    2525
    2626#import "config.h"
    27 #import "TileCache.h"
     27#import "TileController.h"
    2828
    2929#import "IntRect.h"
     
    3232#import "LayerPool.h"
    3333#import "WebLayer.h"
    34 #import "WebTileCacheLayer.h"
     34#import "WebTiledBackingLayer.h"
    3535#import "WebTileLayer.h"
    3636#import <QuartzCore/QuartzCore.h>
     
    4848
    4949@interface WebTiledScrollingIndicatorLayer : CALayer {
    50     WebCore::TileCache* _tileCache;
     50    WebCore::TileController* _tileController;
    5151    CALayer *_visibleRectFrameLayer; // Owned by being a sublayer.
    5252}
    53 @property (assign) WebCore::TileCache* tileCache;
     53@property (assign) WebCore::TileController* tileController;
    5454@property (assign) CALayer* visibleRectFrameLayer;
    5555@end
    5656
    5757@implementation WebTiledScrollingIndicatorLayer
    58 @synthesize tileCache = _tileCache;
     58@synthesize tileController = _tileController;
    5959@synthesize visibleRectFrameLayer = _visibleRectFrameLayer;
    6060- (id)init
     
    7575- (void)drawInContext:(CGContextRef)context
    7676{
    77     if (_tileCache)
    78         _tileCache->drawTileMapContents(context, [self bounds]);
     77    if (_tileController)
     78        _tileController->drawTileMapContents(context, [self bounds]);
    7979}
    8080@end
     
    8787};
    8888
    89 static const int defaultTileCacheWidth = 512;
    90 static const int defaultTileCacheHeight = 512;
    91 
    92 PassOwnPtr<TileCache> TileCache::create(WebTileCacheLayer* tileCacheLayer)
    93 {
    94     return adoptPtr(new TileCache(tileCacheLayer));
    95 }
    96 
    97 TileCache::TileCache(WebTileCacheLayer* tileCacheLayer)
     89static const int defaultTileWidth = 512;
     90static const int defaultTileHeight = 512;
     91
     92PassOwnPtr<TileController> TileController::create(WebTiledBackingLayer* tileCacheLayer)
     93{
     94    return adoptPtr(new TileController(tileCacheLayer));
     95}
     96
     97TileController::TileController(WebTiledBackingLayer* tileCacheLayer)
    9898    : m_tileCacheLayer(tileCacheLayer)
    9999    , m_tileContainerLayer(adoptCF([[CALayer alloc] init]))
    100     , m_tileSize(defaultTileCacheWidth, defaultTileCacheHeight)
    101     , m_tileRevalidationTimer(this, &TileCache::tileRevalidationTimerFired)
    102     , m_cohortRemovalTimer(this, &TileCache::cohortRemovalTimerFired)
     100    , m_tileSize(defaultTileWidth, defaultTileHeight)
     101    , m_tileRevalidationTimer(this, &TileController::tileRevalidationTimerFired)
     102    , m_cohortRemovalTimer(this, &TileController::cohortRemovalTimerFired)
    103103    , m_scale(1)
    104104    , m_deviceScaleFactor(1)
     
    118118    [m_tileCacheLayer addSublayer:m_tileContainerLayer.get()];
    119119#ifndef NDEBUG
    120     [m_tileContainerLayer.get() setName:@"TileCache Container Layer"];
     120    [m_tileContainerLayer.get() setName:@"TileController Container Layer"];
    121121#endif
    122122    [CATransaction commit];
    123123}
    124124
    125 TileCache::~TileCache()
     125TileController::~TileController()
    126126{
    127127    ASSERT(isMainThread());
     
    129129    for (TileMap::iterator it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) {
    130130        const TileInfo& tileInfo = it->value;
    131         [tileInfo.layer.get() setTileCache:0];
     131        [tileInfo.layer.get() setTileController:0];
    132132    }
    133133   
    134134    if (m_tiledScrollingIndicatorLayer)
    135         [m_tiledScrollingIndicatorLayer.get() setTileCache:nil];
    136 }
    137 
    138 void TileCache::tileCacheLayerBoundsChanged()
     135        [m_tiledScrollingIndicatorLayer.get() setTileController:nil];
     136}
     137
     138void TileController::tileCacheLayerBoundsChanged()
    139139{
    140140    if (m_tiles.isEmpty()) {
     
    148148}
    149149
    150 void TileCache::setNeedsDisplay()
     150void TileController::setNeedsDisplay()
    151151{
    152152    for (TileMap::const_iterator it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) {
     
    156156}
    157157
    158 void TileCache::setNeedsDisplayInRect(const IntRect& rect)
     158void TileController::setNeedsDisplayInRect(const IntRect& rect)
    159159{
    160160    if (m_tiles.isEmpty())
     
    187187}
    188188
    189 void TileCache::setTileNeedsDisplayInRect(const TileIndex& tileIndex, TileInfo& tileInfo, const IntRect& repaintRectInTileCoords, const IntRect& coverageRectInTileCoords)
     189void TileController::setTileNeedsDisplayInRect(const TileIndex& tileIndex, TileInfo& tileInfo, const IntRect& repaintRectInTileCoords, const IntRect& coverageRectInTileCoords)
    190190{
    191191    WebTileLayer* tileLayer = tileInfo.layer.get();
     
    214214
    215215
    216 void TileCache::drawLayer(WebTileLayer *layer, CGContextRef context)
     216void TileController::drawLayer(WebTileLayer *layer, CGContextRef context)
    217217{
    218218    PlatformCALayer* platformLayer = PlatformCALayer::platformCALayer(m_tileCacheLayer);
     
    232232}
    233233
    234 void TileCache::setScale(CGFloat scale)
     234void TileController::setScale(CGFloat scale)
    235235{
    236236    PlatformCALayer* platformLayer = PlatformCALayer::platformCALayer(m_tileCacheLayer);
     
    268268}
    269269
    270 void TileCache::setAcceleratesDrawing(bool acceleratesDrawing)
     270void TileController::setAcceleratesDrawing(bool acceleratesDrawing)
    271271{
    272272#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     
    285285}
    286286
    287 void TileCache::setTilesOpaque(bool opaque)
     287void TileController::setTilesOpaque(bool opaque)
    288288{
    289289    if (opaque == m_tilesAreOpaque)
     
    298298}
    299299
    300 void TileCache::setVisibleRect(const FloatRect& visibleRect)
     300void TileController::setVisibleRect(const FloatRect& visibleRect)
    301301{
    302302    if (m_visibleRect == visibleRect)
     
    307307}
    308308
    309 void TileCache::setExposedRect(const FloatRect& exposedRect)
     309void TileController::setExposedRect(const FloatRect& exposedRect)
    310310{
    311311    if (m_exposedRect == exposedRect)
     
    316316}
    317317
    318 void TileCache::setClipsToExposedRect(bool clipsToExposedRect)
     318void TileController::setClipsToExposedRect(bool clipsToExposedRect)
    319319{
    320320    if (m_clipsToExposedRect == clipsToExposedRect)
     
    328328}
    329329
    330 void TileCache::prepopulateRect(const FloatRect& rect)
     330void TileController::prepopulateRect(const FloatRect& rect)
    331331{
    332332    ensureTilesForRect(rect);
    333333}
    334334
    335 void TileCache::setIsInWindow(bool isInWindow)
     335void TileController::setIsInWindow(bool isInWindow)
    336336{
    337337    if (m_isInWindow == isInWindow)
     
    348348}
    349349
    350 void TileCache::setTileCoverage(TileCoverage coverage)
     350void TileController::setTileCoverage(TileCoverage coverage)
    351351{
    352352    if (coverage == m_tileCoverage)
     
    357357}
    358358
    359 void TileCache::forceRepaint()
     359void TileController::forceRepaint()
    360360{
    361361    setNeedsDisplay();
    362362}
    363363
    364 void TileCache::setTileDebugBorderWidth(float borderWidth)
     364void TileController::setTileDebugBorderWidth(float borderWidth)
    365365{
    366366    if (m_tileDebugBorderWidth == borderWidth)
     
    374374}
    375375
    376 void TileCache::setTileDebugBorderColor(CGColorRef borderColor)
     376void TileController::setTileDebugBorderColor(CGColorRef borderColor)
    377377{
    378378    if (m_tileDebugBorderColor == borderColor)
     
    386386}
    387387
    388 IntRect TileCache::bounds() const
     388IntRect TileController::bounds() const
    389389{
    390390    return IntRect(IntPoint(), IntSize([m_tileCacheLayer bounds].size));
    391391}
    392392
    393 IntRect TileCache::rectForTileIndex(const TileIndex& tileIndex) const
     393IntRect TileController::rectForTileIndex(const TileIndex& tileIndex) const
    394394{
    395395    IntRect rect(tileIndex.x() * m_tileSize.width(), tileIndex.y() * m_tileSize.height(), m_tileSize.width(), m_tileSize.height());
     
    402402}
    403403
    404 void TileCache::getTileIndexRangeForRect(const IntRect& rect, TileIndex& topLeft, TileIndex& bottomRight) const
     404void TileController::getTileIndexRangeForRect(const IntRect& rect, TileIndex& topLeft, TileIndex& bottomRight) const
    405405{
    406406    IntRect clampedRect = bounds();
     
    418418}
    419419
    420 FloatRect TileCache::computeTileCoverageRect(const FloatRect& previousVisibleRect) const
     420FloatRect TileController::computeTileCoverageRect(const FloatRect& previousVisibleRect) const
    421421{
    422422    FloatRect visibleRect = m_visibleRect;
     
    459459}
    460460
    461 IntSize TileCache::tileSizeForCoverageRect(const FloatRect& coverageRect) const
     461IntSize TileController::tileSizeForCoverageRect(const FloatRect& coverageRect) const
    462462{
    463463    if (m_tileCoverage & CoverageForSlowScrolling) {
     
    467467    }
    468468
    469     return IntSize(defaultTileCacheWidth, defaultTileCacheHeight);
    470 }
    471 
    472 void TileCache::scheduleTileRevalidation(double interval)
     469    return IntSize(defaultTileWidth, defaultTileHeight);
     470}
     471
     472void TileController::scheduleTileRevalidation(double interval)
    473473{
    474474    if (m_tileRevalidationTimer.isActive() && m_tileRevalidationTimer.nextFireInterval() < interval)
     
    478478}
    479479
    480 void TileCache::tileRevalidationTimerFired(Timer<TileCache>*)
     480void TileController::tileRevalidationTimerFired(Timer<TileController>*)
    481481{
    482482    TileValidationPolicyFlags foregroundValidationPolicy = m_aggressivelyRetainsTiles ? 0 : PruneSecondaryTiles;
     
    486486}
    487487
    488 unsigned TileCache::blankPixelCount() const
     488unsigned TileController::blankPixelCount() const
    489489{
    490490    WebTileLayerList tiles(m_tiles.size());
     
    496496}
    497497
    498 unsigned TileCache::blankPixelCountForTiles(const WebTileLayerList& tiles, const FloatRect& visibleRect, const IntPoint& tileTranslation)
     498unsigned TileController::blankPixelCountForTiles(const WebTileLayerList& tiles, const FloatRect& visibleRect, const IntPoint& tileTranslation)
    499499{
    500500    Region paintedVisibleTiles;
     
    516516}
    517517
    518 static inline void queueTileForRemoval(const TileCache::TileIndex& tileIndex, const TileCache::TileInfo& tileInfo, Vector<TileCache::TileIndex>& tilesToRemove)
     518static inline void queueTileForRemoval(const TileController::TileIndex& tileIndex, const TileController::TileInfo& tileInfo, Vector<TileController::TileIndex>& tilesToRemove)
    519519{
    520520    WebTileLayer* tileLayer = tileInfo.layer.get();
    521521    [tileLayer removeFromSuperlayer];
    522     [tileLayer setTileCache:0];
     522    [tileLayer setTileController:0];
    523523    tilesToRemove.append(tileIndex);
    524524}
    525525
    526 void TileCache::removeAllTiles()
     526void TileController::removeAllTiles()
    527527{
    528528    Vector<TileIndex> tilesToRemove;
     
    537537}
    538538
    539 void TileCache::removeAllSecondaryTiles()
     539void TileController::removeAllSecondaryTiles()
    540540{
    541541    Vector<TileIndex> tilesToRemove;
     
    555555}
    556556
    557 void TileCache::removeTilesInCohort(TileCohort cohort)
     557void TileController::removeTilesInCohort(TileCohort cohort)
    558558{
    559559    ASSERT(cohort != VisibleTileCohort);
     
    574574}
    575575
    576 void TileCache::revalidateTiles(TileValidationPolicyFlags foregroundValidationPolicy, TileValidationPolicyFlags backgroundValidationPolicy)
    577 {
    578     // If the underlying PlatformLayer has been destroyed, but the WebTileCacheLayer hasn't
     576void TileController::revalidateTiles(TileValidationPolicyFlags foregroundValidationPolicy, TileValidationPolicyFlags backgroundValidationPolicy)
     577{
     578    // If the underlying PlatformLayer has been destroyed, but the WebTiledBackingLayer hasn't
    579579    // platformLayer will be null here.
    580580    PlatformCALayer* platformLayer = PlatformCALayer::platformCALayer(m_tileCacheLayer);
     
    700700}
    701701
    702 TileCache::TileCohort TileCache::nextTileCohort() const
     702TileController::TileCohort TileController::nextTileCohort() const
    703703{
    704704    if (!m_cohortList.isEmpty())
     
    708708}
    709709
    710 void TileCache::startedNewCohort(TileCohort cohort)
     710void TileController::startedNewCohort(TileCohort cohort)
    711711{
    712712    m_cohortList.append(TileCohortInfo(cohort, monotonicallyIncreasingTime()));
    713713}
    714714
    715 TileCache::TileCohort TileCache::newestTileCohort() const
     715TileController::TileCohort TileController::newestTileCohort() const
    716716{
    717717    return m_cohortList.isEmpty() ? 0 : m_cohortList.last().cohort;
    718718}
    719719
    720 TileCache::TileCohort TileCache::oldestTileCohort() const
     720TileController::TileCohort TileController::oldestTileCohort() const
    721721{
    722722    return m_cohortList.isEmpty() ? 0 : m_cohortList.first().cohort;
    723723}
    724724
    725 void TileCache::scheduleCohortRemoval()
     725void TileController::scheduleCohortRemoval()
    726726{
    727727    const double cohortRemovalTimerSeconds = 1;
     
    732732}
    733733
    734 void TileCache::cohortRemovalTimerFired(Timer<TileCache>*)
     734void TileController::cohortRemovalTimerFired(Timer<TileController>*)
    735735{
    736736    if (m_cohortList.isEmpty()) {
     
    751751}
    752752
    753 void TileCache::ensureTilesForRect(const FloatRect& rect)
     753void TileController::ensureTilesForRect(const FloatRect& rect)
    754754{
    755755    if (m_unparentsOffscreenTiles && !m_isInWindow)
     
    816816}
    817817
    818 void TileCache::updateTileCoverageMap()
     818void TileController::updateTileCoverageMap()
    819819{
    820820    FloatRect containerBounds = bounds();
     
    869869}
    870870
    871 IntRect TileCache::tileGridExtent() const
     871IntRect TileController::tileGridExtent() const
    872872{
    873873    TileIndex topLeft;
     
    880880
    881881// Return the rect in layer coords, not tile coords.
    882 IntRect TileCache::tileCoverageRect() const
     882IntRect TileController::tileCoverageRect() const
    883883{
    884884    IntRect coverageRectInLayerCoords(m_primaryTileCoverageRect);
     
    887887}
    888888
    889 CALayer *TileCache::tiledScrollingIndicatorLayer()
     889CALayer *TileController::tiledScrollingIndicatorLayer()
    890890{
    891891    if (!m_tiledScrollingIndicatorLayer) {
    892892        m_tiledScrollingIndicatorLayer = [WebTiledScrollingIndicatorLayer layer];
    893         [m_tiledScrollingIndicatorLayer.get() setTileCache:this];
     893        [m_tiledScrollingIndicatorLayer.get() setTileController:this];
    894894        [m_tiledScrollingIndicatorLayer.get() setOpacity:0.75];
    895895        [m_tiledScrollingIndicatorLayer.get() setAnchorPoint:CGPointZero];
     
    903903}
    904904
    905 void TileCache::setScrollingModeIndication(ScrollingModeIndication scrollingMode)
     905void TileController::setScrollingModeIndication(ScrollingModeIndication scrollingMode)
    906906{
    907907    if (scrollingMode == m_indicatorMode)
     
    914914}
    915915
    916 WebTileLayer* TileCache::tileLayerAtIndex(const TileIndex& index) const
     916WebTileLayer* TileController::tileLayerAtIndex(const TileIndex& index) const
    917917{
    918918    return m_tiles.get(index).layer.get();
    919919}
    920920
    921 RetainPtr<WebTileLayer> TileCache::createTileLayer(const IntRect& tileRect)
     921RetainPtr<WebTileLayer> TileController::createTileLayer(const IntRect& tileRect)
    922922{
    923923    RetainPtr<WebTileLayer> layer = LayerPool::sharedPool()->takeLayerWithSize(tileRect.size());
     
    931931    [layer.get() setAnchorPoint:CGPointZero];
    932932    [layer.get() setFrame:tileRect];
    933     [layer.get() setTileCache:this];
     933    [layer.get() setTileController:this];
    934934    [layer.get() setBorderColor:m_tileDebugBorderColor.get()];
    935935    [layer.get() setBorderWidth:m_tileDebugBorderWidth];
     
    948948}
    949949
    950 bool TileCache::shouldShowRepaintCounters() const
     950bool TileController::shouldShowRepaintCounters() const
    951951{
    952952    PlatformCALayer* platformLayer = PlatformCALayer::platformCALayer(m_tileCacheLayer);
     
    962962}
    963963
    964 void TileCache::drawRepaintCounter(WebTileLayer *layer, CGContextRef context)
     964void TileController::drawRepaintCounter(WebTileLayer *layer, CGContextRef context)
    965965{
    966966    unsigned paintCount = [layer incrementPaintCount];
     
    10011001}
    10021002
    1003 void TileCache::drawTileMapContents(CGContextRef context, CGRect layerBounds)
     1003void TileController::drawTileMapContents(CGContextRef context, CGRect layerBounds)
    10041004{
    10051005    CGContextSetRGBFillColor(context, 0.3, 0.3, 0.3, 1);
  • trunk/Source/WebCore/platform/graphics/ca/mac/WebTileLayer.h

    r136774 r145148  
    2828
    2929namespace WebCore {
    30     class TileCache;
     30class TileController;
    3131}
    3232
    3333@interface WebTileLayer : CALayer {
    34     WebCore::TileCache* _tileCache;
     34    WebCore::TileController* _tileController;
    3535    unsigned _paintCount;
    3636}
    3737
    38 - (void)setTileCache:(WebCore::TileCache*)tileCache;
     38- (void)setTileController:(WebCore::TileController*)tileController;
    3939- (void)resetPaintCount;
    4040- (unsigned)incrementPaintCount;
  • trunk/Source/WebCore/platform/graphics/ca/mac/WebTileLayer.mm

    r143537 r145148  
    2727#import "WebTileLayer.h"
    2828
    29 #import "TileCache.h"
     29#import "TileController.h"
    3030#import <wtf/CurrentTime.h>
    3131#import <wtf/UnusedParam.h>
     
    4949- (void)drawInContext:(CGContextRef)context
    5050{
    51     if (_tileCache) {
    52         _tileCache->drawLayer(self, context);
     51    if (_tileController) {
     52        _tileController->drawLayer(self, context);
    5353
    54         if (static_cast<TiledBacking*>(_tileCache)->scrollingPerformanceLoggingEnabled())
     54        if (static_cast<TiledBacking*>(_tileController)->scrollingPerformanceLoggingEnabled())
    5555            [self logFilledFreshTile];
    5656    }
    5757}
    5858
    59 - (void)setTileCache:(WebCore::TileCache*)tileCache
     59- (void)setTileController:(WebCore::TileController*)tileController
    6060{
    61     _tileCache = tileCache;
     61    _tileController = tileController;
    6262}
    6363
     
    8080{
    8181    FloatRect visiblePart([self frame]);
    82     visiblePart.intersect(_tileCache->visibleRect());
     82    visiblePart.intersect(_tileController->visibleRect());
    8383
    8484    if ([self paintCount] == 1 && !visiblePart.isEmpty())
    85         WTFLogAlways("SCROLLING: Filled visible fresh tile. Time: %f Unfilled Pixels: %u\n", WTF::monotonicallyIncreasingTime(), _tileCache->blankPixelCount());
     85        WTFLogAlways("SCROLLING: Filled visible fresh tile. Time: %f Unfilled Pixels: %u\n", WTF::monotonicallyIncreasingTime(), _tileController->blankPixelCount());
    8686}
    8787
  • trunk/Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h

    • Property svn:keywords set to Date Author Id Revision HeadURL
    r145146 r145148  
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25  
    26 #ifndef WebTileCacheLayer_h
    27 #define WebTileCacheLayer_h
     25
     26#ifndef WebTiledBackingLayer_h
     27#define WebTiledBackingLayer_h
    2828
    2929#import <QuartzCore/QuartzCore.h>
     
    3131
    3232namespace WebCore {
    33     class IntRect;
    34     class TileCache;
    35     class TiledBacking;
     33class IntRect;
     34class TileController;
     35class TiledBacking;
    3636}
    3737
    38 @interface WebTileCacheLayer : CALayer {
    39     OwnPtr<WebCore::TileCache> _tileCache;
     38@interface WebTiledBackingLayer : CALayer {
     39    OwnPtr<WebCore::TileController> _tileController;
    4040}
    4141
     
    4646@end
    4747
    48 #endif // WebTileCacheLayer_h
     48#endif // WebTiledBackingLayer_h
  • trunk/Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm

    r145146 r145148  
    2525
    2626#import "config.h"
    27 #import "WebTileCacheLayer.h"
     27#import "WebTiledBackingLayer.h"
    2828
    2929#import "IntRect.h"
    30 #import "TileCache.h"
     30#import "TileController.h"
    3131#import <wtf/MainThread.h>
    3232
    3333using namespace WebCore;
    3434
    35 @implementation WebTileCacheLayer
     35@implementation WebTiledBackingLayer
    3636
    3737- (id)init
     
    4141        return nil;
    4242
    43     _tileCache = TileCache::create(self);
     43    _tileController = TileController::create(self);
    4444#ifndef NDEBUG
    45     [self setName:@"WebTileCacheLayer"];
     45    [self setName:@"WebTiledBackingLayer"];
    4646#endif
    4747    return self;
     
    5050- (void)dealloc
    5151{
    52     ASSERT(!_tileCache);
     52    ASSERT(!_tileController);
    5353
    5454    [super dealloc];
     
    7575    [super setBounds:bounds];
    7676
    77     _tileCache->tileCacheLayerBoundsChanged();
     77    _tileController->tileCacheLayerBoundsChanged();
    7878}
    7979
    8080- (void)setOpaque:(BOOL)opaque
    8181{
    82     _tileCache->setTilesOpaque(opaque);
     82    _tileController->setTilesOpaque(opaque);
    8383}
    8484
    8585- (BOOL)isOpaque
    8686{
    87     return _tileCache->tilesAreOpaque();
     87    return _tileController->tilesAreOpaque();
    8888}
    8989
    9090- (void)setNeedsDisplay
    9191{
    92     _tileCache->setNeedsDisplay();
     92    _tileController->setNeedsDisplay();
    9393}
    9494
    9595- (void)setNeedsDisplayInRect:(CGRect)rect
    9696{
    97     _tileCache->setNeedsDisplayInRect(enclosingIntRect(rect));
     97    _tileController->setNeedsDisplayInRect(enclosingIntRect(rect));
    9898}
    9999
    100100- (void)setAcceleratesDrawing:(BOOL)acceleratesDrawing
    101101{
    102     _tileCache->setAcceleratesDrawing(acceleratesDrawing);
     102    _tileController->setAcceleratesDrawing(acceleratesDrawing);
    103103}
    104104
    105105- (BOOL)acceleratesDrawing
    106106{
    107     return _tileCache->acceleratesDrawing();
     107    return _tileController->acceleratesDrawing();
    108108}
    109109
    110110- (void)setContentsScale:(CGFloat)contentsScale
    111111{
    112     _tileCache->setScale(contentsScale);
     112    _tileController->setScale(contentsScale);
    113113}
    114114
    115115- (CALayer *)tileContainerLayer
    116116{
    117     return _tileCache->tileContainerLayer();
     117    return _tileController->tileContainerLayer();
    118118}
    119119
    120120- (WebCore::TiledBacking*)tiledBacking
    121121{
    122     return _tileCache.get();
     122    return _tileController.get();
    123123}
    124124
     
    126126{
    127127    ASSERT(isMainThread());
    128     ASSERT(_tileCache);
    129     _tileCache = nullptr;
     128    ASSERT(_tileController);
     129    _tileController = nullptr;
    130130}
    131131
    132132- (void)setBorderColor:(CGColorRef)borderColor
    133133{
    134     _tileCache->setTileDebugBorderColor(borderColor);
     134    _tileController->setTileDebugBorderColor(borderColor);
    135135}
    136136
     
    138138{
    139139    // Tiles adjoin, so halve the border width.
    140     _tileCache->setTileDebugBorderWidth(borderWidth / 2);
     140    _tileController->setTileDebugBorderWidth(borderWidth / 2);
    141141}
    142142
  • trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm

    r137915 r145148  
    134134    int repaintCount = layerContents->platformCALayerIncrementRepaintCount();
    135135
    136     if (!platformLayer->usesTileCacheLayer() && layerContents && layerContents->platformCALayerShowRepaintCounter(platformLayer)) {
     136    if (!platformLayer->usesTiledBackingLayer() && layerContents && layerContents->platformCALayerShowRepaintCounter(platformLayer)) {
    137137        bool isTiledLayer = [layer isKindOfClass:[CATiledLayer class]];
    138138
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r145067 r145148  
    146146
    147147            tiledBacking->setScrollingPerformanceLoggingEnabled(frame->settings() && frame->settings()->scrollingPerformanceLoggingEnabled());
    148             adjustTileCacheCoverage();
     148            adjustTiledBackingCoverage();
    149149        }
    150150    }
     
    185185}
    186186
    187 bool RenderLayerBacking::shouldUseTileCache(const GraphicsLayer*) const
     187bool RenderLayerBacking::shouldUseTiledBacking(const GraphicsLayer*) const
    188188{
    189189    return m_usingTiledCacheLayer && m_creatingPrimaryGraphicsLayer;
     
    195195}
    196196
    197 void RenderLayerBacking::adjustTileCacheCoverage()
     197void RenderLayerBacking::adjustTiledBackingCoverage()
    198198{
    199199    if (!m_usingTiledCacheLayer)
     
    275275   
    276276    // The call to createGraphicsLayer ends calling back into here as
    277     // a GraphicsLayerClient to ask if it shouldUseTileCache(). We only want
     277    // a GraphicsLayerClient to ask if it shouldUseTiledBacking(). We only want
    278278    // the tile cache on our main layer. This is pretty ugly, but saves us from
    279279    // exposing the API to all clients.
     
    284284
    285285    if (m_usingTiledCacheLayer)
    286         m_childContainmentLayer = createGraphicsLayer("TileCache Flattening Layer");
     286        m_childContainmentLayer = createGraphicsLayer("TiledBacking Flattening Layer");
    287287
    288288    if (m_isMainFrameRenderViewLayer) {
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r141039 r145148  
    148148    bool hasUnpositionedOverflowControlsLayers() const;
    149149
    150     bool usingTileCache() const { return m_usingTiledCacheLayer; }
     150    bool usingTiledBacking() const { return m_usingTiledCacheLayer; }
    151151    TiledBacking* tiledBacking() const;
    152     void adjustTileCacheCoverage();
     152    void adjustTiledBackingCoverage();
    153153   
    154154    void updateDebugIndicators(bool showBorder, bool showRepaintCounter);
    155155
    156156    // GraphicsLayerClient interface
    157     virtual bool shouldUseTileCache(const GraphicsLayer*) const OVERRIDE;
     157    virtual bool shouldUseTiledBacking(const GraphicsLayer*) const OVERRIDE;
    158158    virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime) OVERRIDE;
    159159    virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE;
     
    261261    bool shouldClipCompositedBounds() const;
    262262
    263     bool hasTileCacheFlatteningLayer() const { return (m_childContainmentLayer && m_usingTiledCacheLayer); }
     263    bool hasTiledBackingFlatteningLayer() const { return (m_childContainmentLayer && m_usingTiledCacheLayer); }
    264264    GraphicsLayer* tileCacheFlatteningLayer() const { return m_usingTiledCacheLayer ? m_childContainmentLayer.get() : 0; }
    265265
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r145067 r145148  
    12371237    RenderLayerBacking* renderViewBacking = m_renderView->layer()->backing();
    12381238    if (renderViewBacking)
    1239         renderViewBacking->adjustTileCacheCoverage();
     1239        renderViewBacking->adjustTiledBackingCoverage();
    12401240}
    12411241
     
    12431243{
    12441244    RenderLayerBacking* renderViewBacking = m_renderView->layer()->backing();
    1245     if (renderViewBacking && renderViewBacking->usingTileCache())
     1245    if (renderViewBacking && renderViewBacking->usingTiledBacking())
    12461246        setCompositingLayersNeedRebuild();
    12471247}
     
    22742274{
    22752275    RenderLayerBacking* renderViewBacking = m_renderView->layer()->backing();
    2276     return renderViewBacking && renderViewBacking->usingTileCache();
     2276    return renderViewBacking && renderViewBacking->usingTiledBacking();
    22772277}
    22782278
Note: See TracChangeset for help on using the changeset viewer.