Title: [127134] trunk/Source/WebCore
- Revision
- 127134
- Author
- [email protected]
- Date
- 2012-08-30 07:05:18 -0700 (Thu, 30 Aug 2012)
Log Message
[BlackBerry] LayerTiler needs to respect new setting for prefill rect.
https://bugs.webkit.org/show_bug.cgi?id=95446
Patch by Andrew Lo <[email protected]> on 2012-08-30
Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson.
Internal PR181637
Use new prefill rectangle setting to determine which tiles should be
prefilled in LayerTiler.
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::shouldPrefillTile):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (127133 => 127134)
--- trunk/Source/WebCore/ChangeLog 2012-08-30 14:05:18 UTC (rev 127133)
+++ trunk/Source/WebCore/ChangeLog 2012-08-30 14:05:18 UTC (rev 127134)
@@ -1,3 +1,18 @@
+2012-08-30 Andrew Lo <[email protected]>
+
+ [BlackBerry] LayerTiler needs to respect new setting for prefill rect.
+ https://bugs.webkit.org/show_bug.cgi?id=95446
+
+ Reviewed by Rob Buis.
+
+ Internally reviewed by Arvid Nilsson.
+ Internal PR181637
+ Use new prefill rectangle setting to determine which tiles should be
+ prefilled in LayerTiler.
+
+ * platform/graphics/blackberry/LayerTiler.cpp:
+ (WebCore::LayerTiler::shouldPrefillTile):
+
2012-08-29 Dirk Schulze <[email protected]>
Refactor WrapShape to Shape/BasicShape
Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp (127133 => 127134)
--- trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp 2012-08-30 14:05:18 UTC (rev 127133)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp 2012-08-30 14:05:18 UTC (rev 127134)
@@ -30,6 +30,7 @@
#include "TextureCacheCompositingThread.h"
#include <BlackBerryPlatformScreen.h>
+#include <BlackBerryPlatformSettings.h>
#include <GLES2/gl2.h>
using namespace std;
@@ -694,19 +695,9 @@
bool LayerTiler::shouldPrefillTile(const TileIndex& index)
{
- // For now, we use the heuristic of prefilling the first screenful of tiles.
- // This gives the correct result only for layers with identity transform,
- // which is why it's called a heuristic here. This is needed for the case
- // where the developer actually designed their web page around the use of
- // accelerated compositing, and expects even offscreen layers to have content.
- // We oblige them to some degree by prefilling a screenful of tiles.
- // This is redundant in some other scenarios, i.e. when an offscreen layer
- // is composited only because of overlapping a flash ad or something like
- // that, but we're willing to make this tradeoff.
-
- // Since the tileMultiplier indicates how many tiles fit on the screen,
- // the following formula can be used:
- return index.i() < static_cast<unsigned>(tileMultiplier) && index.j() < static_cast<unsigned>(tileMultiplier);
+ IntRect prefillTargetRect = BlackBerry::Platform::Settings::instance()->layerTilerPrefillRect();
+ IntRect tileRect = IntRect(originOfTile(index), tileSize());
+ return prefillTargetRect.intersects(tileRect);
}
TileIndex LayerTiler::indexOfTile(const WebCore::IntPoint& origin)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes