Title: [96172] trunk/Source/WebCore
- Revision
- 96172
- Author
- jam...@google.com
- Date
- 2011-09-27 16:51:09 -0700 (Tue, 27 Sep 2011)
Log Message
[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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (96171 => 96172)
--- trunk/Source/WebCore/ChangeLog 2011-09-27 23:48:49 UTC (rev 96171)
+++ trunk/Source/WebCore/ChangeLog 2011-09-27 23:51:09 UTC (rev 96172)
@@ -1,3 +1,19 @@
+2011-09-27 James Robinson <jam...@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 <macpher...@chromium.org>
Slightly improve performance of CSSStyleApplyProperty handler lookup.
Modified: trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp (96171 => 96172)
--- trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp 2011-09-27 23:48:49 UTC (rev 96171)
+++ trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp 2011-09-27 23:51:09 UTC (rev 96172)
@@ -120,8 +120,7 @@
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.
@@ -129,8 +128,7 @@
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);
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp (96171 => 96172)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp 2011-09-27 23:48:49 UTC (rev 96171)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp 2011-09-27 23:51:09 UTC (rev 96172)
@@ -101,8 +101,7 @@
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));
@@ -254,8 +253,7 @@
context()->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0);
return true;
}
-#endif // SKIA
-#endif // !THREADED_COMPOSITING
+#endif // USE(SKIA) && USE(ACCELERATED_DRAWING)
} // namespace WebCore
#endif // USE(ACCELERATED_COMPOSITING)
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.h (96171 => 96172)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.h 2011-09-27 23:48:49 UTC (rev 96171)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.h 2011-09-27 23:51:09 UTC (rev 96172)
@@ -79,7 +79,7 @@
LayerTextureSubImage m_texSubImage;
};
-#if USE(SKIA)
+#if USE(SKIA) && USE(ACCELERATED_DRAWING)
class LayerTextureUpdaterSkPicture : public LayerTextureUpdaterCanvas {
public:
static PassRefPtr<LayerTextureUpdaterSkPicture> create(PassOwnPtr<LayerPainterChromium>);
@@ -105,7 +105,7 @@
Platform3DObject m_depthStencilBuffer;
OwnPtr<SkCanvas> m_canvas; // GPU accelerated canvas.
};
-#endif // SKIA
+#endif // USE(SKIA) && USE(ACCELERATED_DRAWING)
} // namespace WebCore
#endif // USE(ACCELERATED_COMPOSITING)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes