Use a typedef for TileGrid tile validation policy flags
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Apr 2015 07:24:57 +0000 (07:24 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Apr 2015 07:24:57 +0000 (07:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144085

Reviewed by Tim Horton.

Replace 'unsigned' with a typedef for the bitmask of TileValidationPolicyFlags.

* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::tileRevalidationTimerFired):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::revalidateTiles):
* platform/graphics/ca/TileGrid.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183175 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/TileController.cpp
Source/WebCore/platform/graphics/ca/TileGrid.cpp
Source/WebCore/platform/graphics/ca/TileGrid.h

index 60b4e2f..0b8a139 100644 (file)
@@ -1,3 +1,18 @@
+2015-04-23  Simon Fraser  <simon.fraser@apple.com>
+
+        Use a typedef for TileGrid tile validation policy flags
+        https://bugs.webkit.org/show_bug.cgi?id=144085
+
+        Reviewed by Tim Horton.
+
+        Replace 'unsigned' with a typedef for the bitmask of TileValidationPolicyFlags.
+
+        * platform/graphics/ca/TileController.cpp:
+        (WebCore::TileController::tileRevalidationTimerFired):
+        * platform/graphics/ca/TileGrid.cpp:
+        (WebCore::TileGrid::revalidateTiles):
+        * platform/graphics/ca/TileGrid.h:
+
 2015-04-23  Andreas Kling  <akling@apple.com>
 
         Slap Node's reference counting functions with ALWAYS_INLINE stick.
index 6a06d27..0b65282 100644 (file)
@@ -416,7 +416,7 @@ void TileController::tileRevalidationTimerFired()
     // If we are not visible get rid of the zoomed-out tiles.
     m_zoomedOutTileGrid = nullptr;
 
-    unsigned validationPolicy = (shouldAggressivelyRetainTiles() ? 0 : TileGrid::PruneSecondaryTiles) | TileGrid::UnparentAllTiles;
+    TileGrid::TileValidationPolicy validationPolicy = (shouldAggressivelyRetainTiles() ? 0 : TileGrid::PruneSecondaryTiles) | TileGrid::UnparentAllTiles;
 
     tileGrid().revalidateTiles(validationPolicy);
 }
index d21343c..c52a883 100644 (file)
@@ -304,7 +304,7 @@ void TileGrid::removeTilesInCohort(TileCohort cohort)
     removeTiles(tilesToRemove);
 }
 
-void TileGrid::revalidateTiles(unsigned validationPolicy)
+void TileGrid::revalidateTiles(TileValidationPolicy validationPolicy)
 {
     FloatRect visibleRect = m_controller.visibleRect();
     IntRect bounds = m_controller.bounds();
index 8285924..33c942f 100644 (file)
@@ -66,11 +66,13 @@ public:
 
     bool prepopulateRect(const FloatRect&);
 
-    enum TileValidationPolicyFlag {
+    enum TileValidationPolicyFlags {
         PruneSecondaryTiles = 1 << 0,
-        UnparentAllTiles = 1 << 1
+        UnparentAllTiles    = 1 << 1
     };
-    void revalidateTiles(unsigned validationPolicyFlags);
+    typedef unsigned TileValidationPolicy;
+    void revalidateTiles(TileValidationPolicy);
+
     bool tilesWouldChangeForVisibleRect(const FloatRect& newVisibleRect, const FloatRect& oldVisibleRect) const;
 
     IntRect tileCoverageRect() const;