Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp

Issue 7590009: Merge 92255 - Source/WebCore: [Chromium] Use edge-distance method for layer anti-aliasing. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp (revision 92714)
+++ Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp (working copy)
@@ -38,7 +38,7 @@
#include <wtf/CurrentTime.h>
// Start tiling when the width and height of a layer are larger than this size.
-static int maxUntiledSize = 510;
+static int maxUntiledSize = 512;
// When tiling is enabled, use tiles of this dimension squared.
static int defaultTileSize = 256;
@@ -50,7 +50,6 @@
TiledLayerChromium::TiledLayerChromium(GraphicsLayerChromium* owner)
: LayerChromium(owner)
, m_tilingOption(AutoTile)
- , m_borderTexels(true)
{
}
@@ -80,7 +79,7 @@
if (!m_tiler)
return;
- const IntSize tileSize(defaultTileSize, defaultTileSize);
+ const IntSize tileSize(min(defaultTileSize, contentBounds().width()), min(defaultTileSize, contentBounds().height()));
// Tile if both dimensions large, or any one dimension large and the other
// extends into a second tile. This heuristic allows for long skinny layers
@@ -97,8 +96,7 @@
else
isTiled = autoTiled;
- // Empty tile size tells the tiler to avoid tiling.
- IntSize requestedSize = isTiled ? tileSize : IntSize();
+ IntSize requestedSize = isTiled ? tileSize : contentBounds();
const int maxSize = layerRenderer()->maxTextureSize();
IntSize clampedSize = requestedSize.shrunkTo(IntSize(maxSize, maxSize));
m_tiler->setTileSize(clampedSize);
@@ -128,7 +126,7 @@
m_tiler = LayerTilerChromium::create(
layerRenderer(),
IntSize(defaultTileSize, defaultTileSize),
- m_borderTexels ? LayerTilerChromium::HasBorderTexels : LayerTilerChromium::NoBorderTexels);
+ LayerTilerChromium::HasBorderTexels);
}
void TiledLayerChromium::updateCompositorResources()
@@ -144,7 +142,6 @@
void TiledLayerChromium::setIsMask(bool isMask)
{
- m_borderTexels = !isMask;
setTilingOption(isMask ? NeverTile : AutoTile);
}
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h ('k') | Source/WebCore/platform/graphics/gpu/TilingData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698