Diff
Modified: trunk/Source/WebCore/ChangeLog (118672 => 118673)
--- trunk/Source/WebCore/ChangeLog 2012-05-28 10:23:41 UTC (rev 118672)
+++ trunk/Source/WebCore/ChangeLog 2012-05-28 11:13:04 UTC (rev 118673)
@@ -1,3 +1,28 @@
+2012-05-28 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r118580.
+ http://trac.webkit.org/changeset/118580
+ https://bugs.webkit.org/show_bug.cgi?id=87647
+
+ Caused webkit_unit_tests to crash on chromium. (Requested by
+ bulach on #webkit).
+
+ * platform/graphics/chromium/ContentLayerChromium.cpp:
+ (WebCore::ContentLayerPainter::create):
+ (WebCore::ContentLayerPainter::paint):
+ (WebCore::ContentLayerPainter::ContentLayerPainter):
+ (ContentLayerPainter):
+ (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
+ * platform/graphics/chromium/TiledLayerChromium.cpp:
+ (UpdatableTile):
+ (WebCore::UpdatableTile::UpdatableTile):
+ (WebCore::TiledLayerChromium::updateTiles):
+ * platform/graphics/chromium/TiledLayerChromium.h:
+ (TiledLayerChromium):
+ * platform/graphics/chromium/cc/CCLayerTreeHost.h:
+ (WebCore::CCSettings::CCSettings):
+ (CCSettings):
+
2012-05-28 Peter Beverloo <pe...@chromium.org>
Æ doesn't get rendered as U+00C6
Modified: trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp (118672 => 118673)
--- trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp 2012-05-28 10:23:41 UTC (rev 118672)
+++ trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp 2012-05-28 11:13:04 UTC (rev 118673)
@@ -49,9 +49,9 @@
class ContentLayerPainter : public LayerPainterChromium {
WTF_MAKE_NONCOPYABLE(ContentLayerPainter);
public:
- static PassOwnPtr<ContentLayerPainter> create(ContentLayerDelegate* delegate, TiledLayerChromium* layer)
+ static PassOwnPtr<ContentLayerPainter> create(ContentLayerDelegate* delegate)
{
- return adoptPtr(new ContentLayerPainter(delegate, layer));
+ return adoptPtr(new ContentLayerPainter(delegate));
}
virtual void paint(GraphicsContext& context, const IntRect& contentRect)
@@ -59,27 +59,19 @@
double paintStart = currentTime();
context.clearRect(contentRect);
context.clip(contentRect);
- {
- GraphicsContextStateSaver stateSaver(context, m_layer->layerTreeHost()->settings().debugShowTileInfo);
-
- m_delegate->paintContents(context, contentRect);
- double paintEnd = currentTime();
- double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart);
- WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelContentPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
- WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelContentPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
- }
- if (m_layer->layerTreeHost()->settings().debugShowTileInfo)
- m_layer->paintDebugTileInfo(context, contentRect);
+ m_delegate->paintContents(context, contentRect);
+ double paintEnd = currentTime();
+ double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart);
+ WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelContentPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
+ WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelContentPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
}
private:
- explicit ContentLayerPainter(ContentLayerDelegate* delegate, TiledLayerChromium* layer)
+ explicit ContentLayerPainter(ContentLayerDelegate* delegate)
: m_delegate(delegate)
- , m_layer(layer)
{
}
ContentLayerDelegate* m_delegate;
- TiledLayerChromium* m_layer;
};
PassRefPtr<ContentLayerChromium> ContentLayerChromium::create(ContentLayerDelegate* delegate)
@@ -134,11 +126,11 @@
if (m_textureUpdater)
return;
if (layerTreeHost()->settings().acceleratePainting)
- m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_delegate, this));
+ m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_delegate));
else if (layerTreeHost()->settings().perTilePainting)
- m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_delegate, this), layerTreeHost()->layerRendererCapabilities().usingMapSub);
+ m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_delegate), layerTreeHost()->layerRendererCapabilities().usingMapSub);
else
- m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_delegate, this), layerTreeHost()->layerRendererCapabilities().usingMapSub);
+ m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_delegate), layerTreeHost()->layerRendererCapabilities().usingMapSub);
m_textureUpdater->setOpaque(opaque());
GC3Denum textureFormat = layerTreeHost()->layerRendererCapabilities().bestTextureFormat;
Modified: trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp (118672 => 118673)
--- trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp 2012-05-28 10:23:41 UTC (rev 118672)
+++ trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp 2012-05-28 11:13:04 UTC (rev 118673)
@@ -29,13 +29,10 @@
#include "TiledLayerChromium.h"
-#include "FontCache.h"
-#include "FontDescription.h"
#include "GraphicsContext3D.h"
#include "LayerRendererChromium.h"
#include "ManagedTexture.h"
#include "Region.h"
-#include "TextRun.h"
#include "TextStream.h"
#include "TraceEvent.h"
@@ -76,15 +73,11 @@
bool partialUpdate;
bool updated;
bool isInUseOnImpl;
- int lastUpdateFrame;
- int totalPaintCount;
private:
explicit UpdatableTile(PassOwnPtr<LayerTextureUpdater::Texture> texture)
: partialUpdate(false)
, updated(false)
, isInUseOnImpl(false)
- , lastUpdateFrame(0)
- , totalPaintCount(0)
, m_texture(texture)
{
}
@@ -416,13 +409,6 @@
return;
}
- if (tile->isDirty() && layerTreeHost()->settings().debugShowTileInfo) {
- // Invalidate the entire tile so that text updates.
- tile->dirtyRect = m_tiler->tileRect(tile);
- tile->lastUpdateFrame = layerTreeHost()->frameNumber();
- tile->totalPaintCount++;
- }
-
paintRect.unite(tile->dirtyRect);
}
}
@@ -726,71 +712,5 @@
return prepaintRect;
}
-void TiledLayerChromium::paintDebugTileInfo(GraphicsContext& context, const IntRect& layerRect)
-{
- FontCachePurgePreventer fontCachePurgePreventer;
-
- // Don't bother writing info onto small tiles.
- const int minDimension = 200;
- if (m_tiler->tileSize().width() < minDimension || m_tiler->tileSize().height() < minDimension)
- return;
-
- if (!m_debugInfoFont) {
- FontDescription fontDesc;
- fontDesc.setGenericFamily(FontDescription::MonospaceFamily);
- fontDesc.setComputedSize(10);
- m_debugInfoFont = adoptPtr(new Font(fontDesc, 0, 0));
- m_debugInfoFont->update(0);
- }
-
- int fontHeight = m_debugInfoFont->fontMetrics().floatHeight() + 2;
-
- int left, top, right, bottom;
- m_tiler->layerRectToTileIndices(layerRect, left, top, right, bottom);
- for (int j = top; j <= bottom; ++j) {
- for (int i = left; i <= right; ++i) {
- UpdatableTile* tile = tileAt(i, j);
- if (!tile)
- continue;
-
- IntRect tileRect = m_tiler->tileRect(tile);
- String info[] = {
- String::format("LayerId(%d)", id()),
- String::format("Index(%d, %d)", i, j),
- String::format("Tile(%d, %d, %d, %d)", tileRect.x(), tileRect.y(), tileRect.width(), tileRect.height()),
- String::format("Frame(%d)", tile->lastUpdateFrame),
- String::format("Count(%d)", tile->totalPaintCount),
- String::format("Layer(%d, %d)", contentBounds().width(), contentBounds().height()),
- };
- const size_t lines = sizeof(info) / sizeof(info[0]);
- int width[lines];
-
- IntPoint center = m_tiler->tileRect(tile).center();
- int currentY = center.y() - fontHeight * lines / 2;
-
- int maxWidth = 0;
- for (size_t i = 0; i < lines; ++i) {
- width[i] = m_debugInfoFont->width(TextRun(info[i]));
- maxWidth = max(width[i], maxWidth);
- }
-
- IntRect textRect(IntPoint(center.x() - maxWidth / 2, currentY - fontHeight / 2), IntSize(maxWidth, fontHeight * lines + fontHeight / 2));
-
- context.setFillColor(Color(192, 192, 192, 192), ColorSpaceDeviceRGB);
- context.fillRect(FloatRect(textRect));
-
- context.setFillColor(Color(64, 64, 64), ColorSpaceDeviceRGB);
-
- for (size_t i = 0; i < lines; ++i) {
- TextRun run(info[i]);
- int textWidth = m_debugInfoFont->width(run);
- IntPoint textStart(center.x() - textWidth / 2, currentY + fontHeight / 2);
- context.drawText(*m_debugInfoFont, run, textStart);
- currentY += fontHeight;
- }
- }
- }
}
-
-}
#endif // USE(ACCELERATED_COMPOSITING)
Modified: trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h (118672 => 118673)
--- trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h 2012-05-28 10:23:41 UTC (rev 118672)
+++ trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h 2012-05-28 11:13:04 UTC (rev 118673)
@@ -28,7 +28,6 @@
#if USE(ACCELERATED_COMPOSITING)
-#include "Font.h"
#include "LayerChromium.h"
#include "cc/CCLayerTilingData.h"
#include "cc/CCTiledLayerImpl.h"
@@ -66,8 +65,6 @@
virtual Region visibleContentOpaqueRegion() const OVERRIDE;
- void paintDebugTileInfo(GraphicsContext&, const IntRect&);
-
protected:
TiledLayerChromium();
@@ -130,7 +127,6 @@
TilingOption m_tilingOption;
OwnPtr<CCLayerTilingData> m_tiler;
- OwnPtr<Font> m_debugInfoFont;
};
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h (118672 => 118673)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h 2012-05-28 10:23:41 UTC (rev 118672)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h 2012-05-28 11:13:04 UTC (rev 118673)
@@ -77,7 +77,6 @@
struct CCSettings {
CCSettings()
: acceleratePainting(false)
- , debugShowTileInfo(false)
, showFPSCounter(false)
, showPlatformLayerTree(false)
, showPaintRects(false)
@@ -94,7 +93,6 @@
{ }
bool acceleratePainting;
- bool debugShowTileInfo;
bool showFPSCounter;
bool showPlatformLayerTree;
bool showPaintRects;