https://bugs.webkit.org/show_bug.cgi?id=68953
Reviewed by Kenneth Russell.
The accelerated drawing code is incompatible with threaded compositing. Rather than tying the two behaviors
together via USE(THREADED_COMPOSITING), this patch guards the accelerated drawing code with its own USE() guard
so the features can advance independently. Today, it's not safe to set both of these flags.
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::createTextureUpdater):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96172
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-09-27 James Robinson <jamesr@chromium.org>
+
+ [chromium] Guard accelerated skia drawing logic with its own define to remove dependency on USE(THREADED_COMPOSITING)
+ https://bugs.webkit.org/show_bug.cgi?id=68953
+
+ Reviewed by Kenneth Russell.
+
+ The accelerated drawing code is incompatible with threaded compositing. Rather than tying the two behaviors
+ together via USE(THREADED_COMPOSITING), this patch guards the accelerated drawing code with its own USE() guard
+ so the features can advance independently. Today, it's not safe to set both of these flags.
+
+ * platform/graphics/chromium/ContentLayerChromium.cpp:
+ (WebCore::ContentLayerChromium::createTextureUpdater):
+ * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
+ * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
+
2011-09-27 Luke Macpherson <macpherson@chromium.org>
Slightly improve performance of CSSStyleApplyProperty handler lookup.
void ContentLayerChromium::createTextureUpdater(const CCLayerTreeHost* host)
{
-#if !USE(THREADED_COMPOSITING)
-#if USE(SKIA)
+#if USE(SKIA) && USE(ACCELERATED_DRAWING)
// Note that host->skiaContext() will crash if called while in threaded
// mode. This thus depends on CCLayerTreeHost::initialize turning off
// acceleratePainting to prevent this from crashing.
m_textureUpdater = LayerTextureUpdaterSkPicture::create(ContentLayerPainter::create(m_delegate));
return;
}
-#endif // SKIA
-#endif // !THREADED_COMPOSITING
+#endif // USE(SKIA) && USE(ACCELERATED_DRAWING)
m_textureUpdater = LayerTextureUpdaterBitmap::create(ContentLayerPainter::create(m_delegate), host->layerRendererCapabilities().usingMapSub);
}
m_texSubImage.upload(locker.pixels(), contentRect(), sourceRect, destRect, texture->format(), context);
}
-#if !USE(THREADED_COMPOSITING)
-#if USE(SKIA)
+#if USE(SKIA) && USE(ACCELERATED_DRAWING)
PassRefPtr<LayerTextureUpdaterSkPicture> LayerTextureUpdaterSkPicture::create(PassOwnPtr<LayerPainterChromium> painter)
{
return adoptRef(new LayerTextureUpdaterSkPicture(painter));
context()->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0);
return true;
}
-#endif // SKIA
-#endif // !THREADED_COMPOSITING
+#endif // USE(SKIA) && USE(ACCELERATED_DRAWING)
} // namespace WebCore
#endif // USE(ACCELERATED_COMPOSITING)
LayerTextureSubImage m_texSubImage;
};
-#if USE(SKIA)
+#if USE(SKIA) && USE(ACCELERATED_DRAWING)
class LayerTextureUpdaterSkPicture : public LayerTextureUpdaterCanvas {
public:
static PassRefPtr<LayerTextureUpdaterSkPicture> create(PassOwnPtr<LayerPainterChromium>);
Platform3DObject m_depthStencilBuffer;
OwnPtr<SkCanvas> m_canvas; // GPU accelerated canvas.
};
-#endif // SKIA
+#endif // USE(SKIA) && USE(ACCELERATED_DRAWING)
} // namespace WebCore
#endif // USE(ACCELERATED_COMPOSITING)