summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/win
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-15 12:23:52 +0000
committerSteve Block <steveblock@google.com>2010-02-16 11:48:32 +0000
commit8a0914b749bbe7da7768e07a7db5c6d4bb09472b (patch)
tree73f9065f370435d6fde32ae129d458a8c77c8dff /WebCore/platform/graphics/win
parentbf14be70295513b8076f3fa47a268a7e42b2c478 (diff)
downloadexternal_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.zip
external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.gz
external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.bz2
Merge webkit.org at r54731 : Initial merge by git
Change-Id: Ia79977b6cf3b0b00c06ef39419989b28e57e4f4a
Diffstat (limited to 'WebCore/platform/graphics/win')
-rw-r--r--WebCore/platform/graphics/win/FontCGWin.cpp4
-rw-r--r--WebCore/platform/graphics/win/FontCacheWin.cpp10
-rw-r--r--WebCore/platform/graphics/win/GraphicsContextCGWin.cpp2
-rw-r--r--WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp2
-rw-r--r--WebCore/platform/graphics/win/GraphicsContextWin.cpp12
-rw-r--r--WebCore/platform/graphics/win/GraphicsLayerCACF.cpp26
-rw-r--r--WebCore/platform/graphics/win/GraphicsLayerCACF.h6
-rw-r--r--WebCore/platform/graphics/win/QTMovieWin.cpp27
-rw-r--r--WebCore/platform/graphics/win/WKCACFLayer.cpp120
-rw-r--r--WebCore/platform/graphics/win/WKCACFLayer.h14
-rw-r--r--WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp17
-rw-r--r--WebCore/platform/graphics/win/WKCACFLayerRenderer.h4
12 files changed, 195 insertions, 49 deletions
diff --git a/WebCore/platform/graphics/win/FontCGWin.cpp b/WebCore/platform/graphics/win/FontCGWin.cpp
index 653b573..8ed8712 100644
--- a/WebCore/platform/graphics/win/FontCGWin.cpp
+++ b/WebCore/platform/graphics/win/FontCGWin.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "Font.h"
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
#include "FloatConversion.h"
#include "GlyphBuffer.h"
#include "GraphicsContext.h"
@@ -225,7 +225,7 @@ static void drawGDIGlyphs(GraphicsContext* graphicsContext, const SimpleFontData
} else {
XFORM xform;
GetWorldTransform(hdc, &xform);
- TransformationMatrix hdcTransform(xform.eM11, xform.eM21, xform.eM12, xform.eM22, xform.eDx, xform.eDy);
+ AffineTransform hdcTransform(xform.eM11, xform.eM21, xform.eM12, xform.eM22, xform.eDx, xform.eDy);
CGAffineTransform initialGlyphTransform = hdcTransform.isInvertible() ? hdcTransform.inverse() : CGAffineTransformIdentity;
if (font->platformData().syntheticOblique())
initialGlyphTransform = CGAffineTransformConcat(initialGlyphTransform, CGAffineTransformMake(1, 0, tanf(syntheticObliqueAngle * piFloat / 180.0f), 1, 0, 0));
diff --git a/WebCore/platform/graphics/win/FontCacheWin.cpp b/WebCore/platform/graphics/win/FontCacheWin.cpp
index 5e61ef3..8869a90 100644
--- a/WebCore/platform/graphics/win/FontCacheWin.cpp
+++ b/WebCore/platform/graphics/win/FontCacheWin.cpp
@@ -296,18 +296,18 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, cons
return fontData;
}
-FontPlatformData* FontCache::getSimilarFontPlatformData(const Font& font)
+SimpleFontData* FontCache::getSimilarFontPlatformData(const Font& font)
{
return 0;
}
-FontPlatformData* FontCache::getLastResortFallbackFont(const FontDescription& fontDescription)
+SimpleFontData* FontCache::getLastResortFallbackFont(const FontDescription& fontDescription)
{
// FIXME: Would be even better to somehow get the user's default font here. For now we'll pick
// the default that the user would get without changing any prefs.
static AtomicString timesStr("Times New Roman");
- if (FontPlatformData* platformFont = getCachedFontPlatformData(fontDescription, timesStr))
- return platformFont;
+ if (SimpleFontData* simpleFont = getCachedFontData(fontDescription, timesStr))
+ return simpleFont;
DEFINE_STATIC_LOCAL(String, defaultGUIFontFamily, ());
if (defaultGUIFontFamily.isEmpty()) {
@@ -316,7 +316,7 @@ FontPlatformData* FontCache::getLastResortFallbackFont(const FontDescription& fo
GetObject(defaultGUIFont, sizeof(logFont), &logFont);
defaultGUIFontFamily = String(logFont.lfFaceName, wcsnlen(logFont.lfFaceName, LF_FACESIZE));
}
- return getCachedFontPlatformData(fontDescription, defaultGUIFontFamily);
+ return getCachedFontData(fontDescription, defaultGUIFontFamily);
}
static LONG toGDIFontWeight(FontWeight fontWeight)
diff --git a/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp b/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
index 47a51de..84c4ce0 100644
--- a/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
+++ b/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "GraphicsContext.h"
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
#include "Path.h"
#include <CoreGraphics/CGBitmapContext.h>
diff --git a/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp b/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
index 43d92fb..7387a14 100644
--- a/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
+++ b/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "GraphicsContext.h"
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
#include "Path.h"
#include <cairo-win32.h>
diff --git a/WebCore/platform/graphics/win/GraphicsContextWin.cpp b/WebCore/platform/graphics/win/GraphicsContextWin.cpp
index 68c12d1..b110145 100644
--- a/WebCore/platform/graphics/win/GraphicsContextWin.cpp
+++ b/WebCore/platform/graphics/win/GraphicsContextWin.cpp
@@ -195,17 +195,7 @@ void GraphicsContextPlatformPrivate::concatCTM(const AffineTransform& transform)
if (!m_hdc)
return;
- XFORM xform = TransformationMatrix(transform.a(), transform.b(), transform.c(),
- transform.d(), transform.e(), transform.f());
- ModifyWorldTransform(m_hdc, &xform, MWT_LEFTMULTIPLY);
-}
-
-void GraphicsContextPlatformPrivate::concatCTM(const TransformationMatrix& transform)
-{
- if (!m_hdc)
- return;
-
- XFORM xform = transform;
+ XFORM xform = transform.toTransformationMatrix();
ModifyWorldTransform(m_hdc, &xform, MWT_LEFTMULTIPLY);
}
diff --git a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
index 5ec90b8..49b5af3 100644
--- a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
+++ b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
@@ -135,6 +135,9 @@ GraphicsLayerCACF::~GraphicsLayerCACF()
if (m_layer)
m_layer->removeFromSuperlayer();
+ if (m_contentsLayer)
+ m_contentsLayer->removeFromSuperlayer();
+
if (m_transformLayer)
m_transformLayer->removeFromSuperlayer();
}
@@ -364,21 +367,18 @@ void GraphicsLayerCACF::setContentsToImage(Image* image)
updateSublayerList();
}
-void GraphicsLayerCACF::setContentsToVideo(PlatformLayer* videoLayer)
+void GraphicsLayerCACF::setContentsToMedia(PlatformLayer* mediaLayer)
{
- bool childrenChanged = false;
-
- if (videoLayer != m_contentsLayer.get())
- childrenChanged = true;
+ if (mediaLayer == m_contentsLayer)
+ return;
- m_contentsLayer = videoLayer;
- m_contentsLayerPurpose = videoLayer ? ContentsLayerForVideo : NoContentsLayer;
+ m_contentsLayer = mediaLayer;
+ m_contentsLayerPurpose = mediaLayer ? ContentsLayerForMedia : NoContentsLayer;
- updateContentsVideo();
+ updateContentsMedia();
- // This has to happen after updateContentsVideo
- if (childrenChanged)
- updateSublayerList();
+ // This has to happen after updateContentsMedia
+ updateSublayerList();
}
void GraphicsLayerCACF::setGeometryOrientation(CompositingCoordinatesOrientation orientation)
@@ -633,9 +633,9 @@ void GraphicsLayerCACF::updateContentsImage()
}
}
-void GraphicsLayerCACF::updateContentsVideo()
+void GraphicsLayerCACF::updateContentsMedia()
{
- // Video layer was set as m_contentsLayer, and will get parented in updateSublayerList().
+ // Media layer was set as m_contentsLayer, and will get parented in updateSublayerList().
if (m_contentsLayer) {
setupContentsLayer(m_contentsLayer.get());
updateContentsRect();
diff --git a/WebCore/platform/graphics/win/GraphicsLayerCACF.h b/WebCore/platform/graphics/win/GraphicsLayerCACF.h
index 93ddf25..0a52764 100644
--- a/WebCore/platform/graphics/win/GraphicsLayerCACF.h
+++ b/WebCore/platform/graphics/win/GraphicsLayerCACF.h
@@ -82,7 +82,7 @@ public:
virtual void setContentsRect(const IntRect&);
virtual void setContentsToImage(Image*);
- virtual void setContentsToVideo(PlatformLayer*);
+ virtual void setContentsToMedia(PlatformLayer*);
virtual PlatformLayer* platformLayer() const;
@@ -115,7 +115,7 @@ private:
void updateLayerBackgroundColor();
void updateContentsImage();
- void updateContentsVideo();
+ void updateContentsMedia();
void updateContentsRect();
void updateGeometryOrientation();
@@ -129,7 +129,7 @@ private:
enum ContentsLayerPurpose {
NoContentsLayer = 0,
ContentsLayerForImage,
- ContentsLayerForVideo
+ ContentsLayerForMedia
};
ContentsLayerPurpose m_contentsLayerPurpose;
diff --git a/WebCore/platform/graphics/win/QTMovieWin.cpp b/WebCore/platform/graphics/win/QTMovieWin.cpp
index 8fd6c71..4831062 100644
--- a/WebCore/platform/graphics/win/QTMovieWin.cpp
+++ b/WebCore/platform/graphics/win/QTMovieWin.cpp
@@ -99,6 +99,7 @@ public:
void deleteGWorld();
void clearGWorld();
void cacheMovieScale();
+ void updateMovieSize();
void setSize(int, int);
@@ -226,8 +227,8 @@ void QTMovieWinPrivate::cacheMovieScale()
GetMovieNaturalBoundsRect(m_movie, &naturalRect);
GetMovieBox(m_movie, &initialRect);
- int naturalWidth = naturalRect.right - naturalRect.left;
- int naturalHeight = naturalRect.bottom - naturalRect.top;
+ float naturalWidth = naturalRect.right - naturalRect.left;
+ float naturalHeight = naturalRect.bottom - naturalRect.top;
if (naturalWidth)
m_widthScaleFactor = (initialRect.right - initialRect.left) / naturalWidth;
@@ -259,14 +260,16 @@ void QTMovieWinPrivate::task()
// we only need to erase the movie gworld when the load state changes to loaded while it
// is visible as the gworld is destroyed/created when visibility changes
bool shouldRestorePlaybackState = false;
- if (loadState >= QTMovieLoadStateLoaded && m_loadState < QTMovieLoadStateLoaded) {
+ bool movieNewlyPlayable = loadState >= QTMovieLoadStateLoaded && m_loadState < QTMovieLoadStateLoaded;
+ m_loadState = loadState;
+ if (movieNewlyPlayable) {
+ cacheMovieScale();
+ updateMovieSize();
if (m_visible)
clearGWorld();
- cacheMovieScale();
shouldRestorePlaybackState = true;
}
- m_loadState = loadState;
if (!m_movieController && m_loadState >= QTMovieLoadStateLoaded)
createMovieController();
m_client->movieLoadStateChanged(m_movieWin);
@@ -403,7 +406,6 @@ void QTMovieWinPrivate::clearGWorld()
MacSetPort(savePort);
}
-
void QTMovieWinPrivate::setSize(int width, int height)
{
if (m_width == width && m_height == height)
@@ -421,17 +423,26 @@ void QTMovieWinPrivate::setSize(int width, int height)
ASSERT(m_scaleCached);
#endif
+ updateMovieSize();
+}
+
+void QTMovieWinPrivate::updateMovieSize()
+{
+ if (!m_movie || m_loadState < QTMovieLoadStateLoaded)
+ return;
+
Rect bounds;
bounds.top = 0;
bounds.left = 0;
- bounds.right = width;
- bounds.bottom = height;
+ bounds.right = m_width;
+ bounds.bottom = m_height;
if (m_movieController)
MCSetControllerBoundsRect(m_movieController, &bounds);
SetMovieBox(m_movie, &bounds);
updateGWorld();
}
+
void QTMovieWinPrivate::deleteGWorld()
{
ASSERT(m_gWorld);
diff --git a/WebCore/platform/graphics/win/WKCACFLayer.cpp b/WebCore/platform/graphics/win/WKCACFLayer.cpp
index e97fac9..e5b184d 100644
--- a/WebCore/platform/graphics/win/WKCACFLayer.cpp
+++ b/WebCore/platform/graphics/win/WKCACFLayer.cpp
@@ -29,6 +29,7 @@
#include "WKCACFLayer.h"
+#include "CString.h"
#include "WKCACFContextFlusher.h"
#include "WKCACFLayerRenderer.h"
@@ -37,6 +38,10 @@
#include <QuartzCore/CARender.h>
#include <QuartzCoreInterface/QuartzCoreInterface.h>
+#ifndef NDEBUG
+#include <wtf/CurrentTime.h>
+#endif
+
#ifdef DEBUG_ALL
#pragma comment(lib, "QuartzCore_debug")
#pragma comment(lib, "QuartzCoreInterface_debug")
@@ -282,6 +287,11 @@ void WKCACFLayer::setNeedsCommit()
m_owner->notifySyncRequired();
}
+bool WKCACFLayer::isTransformLayer() const
+{
+ return CACFLayerGetClass(layer()) == kCACFTransformLayer();
+}
+
void WKCACFLayer::addSublayer(PassRefPtr<WKCACFLayer> sublayer)
{
insertSublayer(sublayer, numSublayers());
@@ -372,6 +382,15 @@ void WKCACFLayer::removeSublayer(const WKCACFLayer* sublayer)
setNeedsCommit();
}
+const WKCACFLayer* WKCACFLayer::sublayerAtIndex(int index) const
+{
+ CFArrayRef sublayers = CACFLayerGetSublayers(layer());
+ if (index < 0 || CFArrayGetCount(sublayers) <= index)
+ return 0;
+
+ return layer(static_cast<CACFLayerRef>(const_cast<void*>(CFArrayGetValueAtIndex(sublayers, index))));
+}
+
int WKCACFLayer::indexOfSublayer(const WKCACFLayer* reference)
{
CACFLayerRef ref = reference->layer();
@@ -518,7 +537,108 @@ void WKCACFLayer::setNeedsDisplay()
setNeedsCommit();
}
+#ifndef NDEBUG
+static void printIndent(int indent)
+{
+ for ( ; indent > 0; --indent)
+ fprintf(stderr, " ");
+}
+
+static void printTransform(const CATransform3D& transform)
+{
+ fprintf(stderr, "[%g %g %g %g; %g %g %g %g; %g %g %g %g; %g %g %g %g]",
+ transform.m11, transform.m12, transform.m13, transform.m14,
+ transform.m21, transform.m22, transform.m23, transform.m24,
+ transform.m31, transform.m32, transform.m33, transform.m34,
+ transform.m41, transform.m42, transform.m43, transform.m44);
+}
+
+void WKCACFLayer::printTree() const
+{
+ // Print heading info
+ CGRect rootBounds = bounds();
+ fprintf(stderr, "\n\n** Render tree at time %g (bounds %g, %g %gx%g) **\n\n",
+ currentTime(), rootBounds.origin.x, rootBounds.origin.y, rootBounds.size.width, rootBounds.size.height);
+
+ // Print layer tree from the root
+ printLayer(0);
+}
+
+void WKCACFLayer::printLayer(int indent) const
+{
+ CGPoint layerPosition = position();
+ CGPoint layerAnchorPoint = anchorPoint();
+ CGRect layerBounds = bounds();
+ printIndent(indent);
+ fprintf(stderr, "(%s [%g %g %g] [%g %g %g %g] [%g %g %g]\n",
+ isTransformLayer() ? "transform-layer" : "layer",
+ layerPosition.x, layerPosition.y, zPosition(),
+ layerBounds.origin.x, layerBounds.origin.y, layerBounds.size.width, layerBounds.size.height,
+ layerAnchorPoint.x, layerAnchorPoint.y, anchorPointZ());
+
+ // Print name if needed
+ String layerName = name();
+ if (!layerName.isEmpty()) {
+ printIndent(indent + 1);
+ fprintf(stderr, "(name %s)\n", layerName.utf8().data());
+ }
+
+ // Print masksToBounds if needed
+ bool layerMasksToBounds = masksToBounds();
+ if (layerMasksToBounds) {
+ printIndent(indent + 1);
+ fprintf(stderr, "(masksToBounds true)\n");
+ }
+
+ // Print opacity if needed
+ float layerOpacity = opacity();
+ if (layerOpacity != 1) {
+ printIndent(indent + 1);
+ fprintf(stderr, "(opacity %hf)\n", layerOpacity);
+ }
+
+ // Print sublayerTransform if needed
+ CATransform3D layerTransform = sublayerTransform();
+ if (!CATransform3DIsIdentity(layerTransform)) {
+ printIndent(indent + 1);
+ fprintf(stderr, "(sublayerTransform ");
+ printTransform(layerTransform);
+ fprintf(stderr, ")\n");
+ }
+
+ // Print transform if needed
+ layerTransform = transform();
+ if (!CATransform3DIsIdentity(layerTransform)) {
+ printIndent(indent + 1);
+ fprintf(stderr, "(transform ");
+ printTransform(layerTransform);
+ fprintf(stderr, ")\n");
+ }
+
+ // Print contents if needed
+ CGImageRef layerContents = contents();
+ if (layerContents) {
+ printIndent(indent + 1);
+ fprintf(stderr, "(contents (image [%d %d]))\n",
+ CGImageGetWidth(layerContents), CGImageGetHeight(layerContents));
+ }
+
+ // Print sublayers if needed
+ int n = numSublayers();
+ if (n > 0) {
+ printIndent(indent + 1);
+ fprintf(stderr, "(sublayers\n");
+ for (int i = 0; i < n; ++i)
+ sublayerAtIndex(i)->printLayer(indent + 2);
+ printIndent(indent + 1);
+ fprintf(stderr, ")\n");
+ }
+
+ printIndent(indent);
+ fprintf(stderr, ")\n");
+}
+#endif // #ifndef NDEBUG
}
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/platform/graphics/win/WKCACFLayer.h b/WebCore/platform/graphics/win/WKCACFLayer.h
index 6892c6e..e5568c9 100644
--- a/WebCore/platform/graphics/win/WKCACFLayer.h
+++ b/WebCore/platform/graphics/win/WKCACFLayer.h
@@ -108,7 +108,7 @@ public:
void display(PlatformGraphicsContext*);
- bool isTransformLayer() const { return CACFLayerGetClass(layer()) == kCACFTransformLayer; }
+ bool isTransformLayer() const;
void addSublayer(PassRefPtr<WKCACFLayer> sublayer);
void insertSublayer(PassRefPtr<WKCACFLayer>, size_t index);
@@ -223,6 +223,11 @@ public:
void setGeometryFlipped(bool flipped) { CACFLayerSetGeometryFlipped(layer(), flipped); setNeedsCommit(); }
bool geometryFlipped() const { return CACFLayerIsGeometryFlipped(layer()); }
+#ifndef NDEBUG
+ // Print the tree from the root. Also does consistency checks
+ void printTree() const;
+#endif
+
private:
WKCACFLayer(LayerType, GraphicsLayerCACF* owner);
@@ -233,6 +238,8 @@ private:
CFArrayRef sublayers = CACFLayerGetSublayers(layer());
return sublayers ? CFArrayGetCount(sublayers) : 0;
}
+
+ const WKCACFLayer* sublayerAtIndex(int) const;
// Returns the index of the passed layer in this layer's sublayers list
// or -1 if not found
@@ -241,6 +248,11 @@ private:
// This should only be called from removeFromSuperlayer.
void removeSublayer(const WKCACFLayer*);
+#ifndef NDEBUG
+ // Print this layer and its children to the console
+ void printLayer(int indent) const;
+#endif
+
RetainPtr<CACFLayerRef> m_layer;
bool m_needsDisplayOnBoundsChange;
GraphicsLayerCACF* m_owner;
diff --git a/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp b/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
index 3bbd4f8..78ebb9d 100644
--- a/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
+++ b/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
@@ -142,6 +142,10 @@ WKCACFLayerRenderer::WKCACFLayerRenderer()
, m_renderTimer(this, &WKCACFLayerRenderer::renderTimerFired)
, m_scrollFrame(0, 0, 1, 1) // Default to 1 to avoid 0 size frames
{
+#ifndef NDEBUG
+ char* printTreeFlag = getenv("CA_PRINT_TREE");
+ m_printTree = printTreeFlag && atoi(printTreeFlag);
+#endif
}
WKCACFLayerRenderer::~WKCACFLayerRenderer()
@@ -157,7 +161,7 @@ void WKCACFLayerRenderer::setScrollFrame(const IntRect& scrollFrame)
m_scrollLayer->setPosition(CGPointMake(0, frameBounds.size.height));
if (m_rootChildLayer)
- m_rootChildLayer->setPosition(CGPointMake(m_scrollFrame.x(), m_scrollFrame.height() + m_scrollFrame.y()));
+ m_rootChildLayer->setPosition(CGPointMake(-m_scrollFrame.x(), m_scrollFrame.height() + m_scrollFrame.y()));
}
void WKCACFLayerRenderer::setRootContents(CGImageRef image)
@@ -173,6 +177,7 @@ void WKCACFLayerRenderer::setRootChildLayer(WebCore::PlatformLayer* layer)
return;
m_scrollLayer->removeAllSublayers();
+ m_rootChildLayer = layer;
if (layer) {
m_scrollLayer->addSublayer(layer);
@@ -180,9 +185,6 @@ void WKCACFLayerRenderer::setRootChildLayer(WebCore::PlatformLayer* layer)
layer->setAnchorPoint(CGPointMake(0, 1));
setScrollFrame(m_scrollFrame);
}
-
- m_rootChildLayer = layer;
-
}
void WKCACFLayerRenderer::setNeedsDisplay()
@@ -230,7 +232,9 @@ void WKCACFLayerRenderer::createRenderer()
// Create the root hierarchy
m_rootLayer = WKCACFLayer::create(WKCACFLayer::Layer);
+ m_rootLayer->setName("WKCACFLayerRenderer rootLayer");
m_scrollLayer = WKCACFLayer::create(WKCACFLayer::Layer);
+ m_scrollLayer->setName("WKCACFLayerRenderer scrollLayer");
m_rootLayer->addSublayer(m_scrollLayer);
m_scrollLayer->setMasksToBounds(true);
@@ -400,6 +404,11 @@ void WKCACFLayerRenderer::render(const Vector<CGRect>& dirtyRects)
} while (err == D3DERR_DEVICELOST);
CARenderUpdateFinish(u);
+
+#ifndef NDEBUG
+ if (m_printTree)
+ m_rootLayer->printTree();
+#endif
}
void WKCACFLayerRenderer::renderSoon()
diff --git a/WebCore/platform/graphics/win/WKCACFLayerRenderer.h b/WebCore/platform/graphics/win/WKCACFLayerRenderer.h
index cb9f04f..4e76f55 100644
--- a/WebCore/platform/graphics/win/WKCACFLayerRenderer.h
+++ b/WebCore/platform/graphics/win/WKCACFLayerRenderer.h
@@ -97,6 +97,10 @@ private:
HWND m_hostWindow;
Timer<WKCACFLayerRenderer> m_renderTimer;
IntRect m_scrollFrame;
+
+#ifndef NDEBUG
+ bool m_printTree;
+#endif
};
}