Title: [120818] trunk/Source/WebKit2
- Revision
- 120818
- Author
- [email protected]
- Date
- 2012-06-20 06:26:56 -0700 (Wed, 20 Jun 2012)
Log Message
REGRESSION (120705) : LayerTreeHostQt asserts in debug.
https://bugs.webkit.org/show_bug.cgi?id=89487
Reviewed by Noam Rosenthal.
We try to call createHandle twice on the same handle when the
first matching atlas is full. This patch solved the problem by
moving the createHandle call inside UpdateAtlas and call createHandle
only when the atlas is not full. We can also remove the surface()
getter as it is not used anymore.
* WebProcess/WebPage/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
* WebProcess/WebPage/UpdateAtlas.h:
(UpdateAtlas):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::beginContentUpdate):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (120817 => 120818)
--- trunk/Source/WebKit2/ChangeLog 2012-06-20 12:35:41 UTC (rev 120817)
+++ trunk/Source/WebKit2/ChangeLog 2012-06-20 13:26:56 UTC (rev 120818)
@@ -1,3 +1,23 @@
+2012-06-20 Alexis Menard <[email protected]>
+
+ REGRESSION (120705) : LayerTreeHostQt asserts in debug.
+ https://bugs.webkit.org/show_bug.cgi?id=89487
+
+ Reviewed by Noam Rosenthal.
+
+ We try to call createHandle twice on the same handle when the
+ first matching atlas is full. This patch solved the problem by
+ moving the createHandle call inside UpdateAtlas and call createHandle
+ only when the atlas is not full. We can also remove the surface()
+ getter as it is not used anymore.
+
+ * WebProcess/WebPage/UpdateAtlas.cpp:
+ (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
+ * WebProcess/WebPage/UpdateAtlas.h:
+ (UpdateAtlas):
+ * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
+ (WebKit::LayerTreeHostQt::beginContentUpdate):
+
2012-06-19 Ryuan Choi <[email protected]>
[EFL][Regression] Build break after r120786
Modified: trunk/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp (120817 => 120818)
--- trunk/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp 2012-06-20 12:35:41 UTC (rev 120817)
+++ trunk/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp 2012-06-20 13:26:56 UTC (rev 120818)
@@ -99,7 +99,7 @@
m_bufferStates[i] = Available;
}
-PassOwnPtr<GraphicsContext> UpdateAtlas::beginPaintingOnAvailableBuffer(const WebCore::IntSize& size, IntPoint& offset)
+PassOwnPtr<GraphicsContext> UpdateAtlas::beginPaintingOnAvailableBuffer(ShareableSurface::Handle& handle, const WebCore::IntSize& size, IntPoint& offset)
{
buildLayoutIfNeeded();
int index = findAvailableIndex(size);
@@ -108,6 +108,9 @@
if (index < 0)
return PassOwnPtr<GraphicsContext>();
+ if (!m_surface->createHandle(handle))
+ return PassOwnPtr<WebCore::GraphicsContext>();
+
// FIXME: Use tri-state buffers, to allow faster updates.
m_bufferStates[index] = Taken;
offset = offsetForIndex(index);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h (120817 => 120818)
--- trunk/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h 2012-06-20 12:35:41 UTC (rev 120817)
+++ trunk/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h 2012-06-20 13:26:56 UTC (rev 120818)
@@ -34,11 +34,10 @@
public:
UpdateAtlas(int dimension, ShareableBitmap::Flags);
- PassRefPtr<ShareableSurface> surface() { return m_surface; }
inline WebCore::IntSize size() const { return m_surface->size(); }
// Returns a null pointer of there is no available buffer.
- PassOwnPtr<WebCore::GraphicsContext> beginPaintingOnAvailableBuffer(const WebCore::IntSize&, WebCore::IntPoint& offset);
+ PassOwnPtr<WebCore::GraphicsContext> beginPaintingOnAvailableBuffer(ShareableSurface::Handle&, const WebCore::IntSize&, WebCore::IntPoint& offset);
void didSwapBuffers();
ShareableBitmap::Flags flags() const { return m_flags; }
Modified: trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp (120817 => 120818)
--- trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp 2012-06-20 12:35:41 UTC (rev 120817)
+++ trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp 2012-06-20 13:26:56 UTC (rev 120818)
@@ -552,13 +552,6 @@
m_updateAtlases.clear();
}
-static PassOwnPtr<WebCore::GraphicsContext> beginContentUpdateInAtlas(UpdateAtlas& atlas, const WebCore::IntSize& size, ShareableSurface::Handle& handle, WebCore::IntPoint& offset)
-{
- if (!atlas.surface()->createHandle(handle))
- return PassOwnPtr<WebCore::GraphicsContext>();
- return atlas.beginPaintingOnAvailableBuffer(size, offset);
-}
-
PassOwnPtr<WebCore::GraphicsContext> LayerTreeHostQt::beginContentUpdate(const WebCore::IntSize& size, ShareableBitmap::Flags flags, ShareableSurface::Handle& handle, WebCore::IntPoint& offset)
{
OwnPtr<WebCore::GraphicsContext> graphicsContext;
@@ -566,7 +559,7 @@
UpdateAtlas& atlas = m_updateAtlases[i];
if (atlas.flags() == flags) {
// This will return null if there is no available buffer space.
- graphicsContext = beginContentUpdateInAtlas(atlas, size, handle, offset);
+ graphicsContext = atlas.beginPaintingOnAvailableBuffer(handle, size, offset);
if (graphicsContext)
return graphicsContext.release();
}
@@ -574,7 +567,7 @@
static const int ScratchBufferDimension = 2000;
m_updateAtlases.append(UpdateAtlas(ScratchBufferDimension, flags));
- return beginContentUpdateInAtlas(m_updateAtlases.last(), size, handle, offset);
+ return m_updateAtlases.last().beginPaintingOnAvailableBuffer(handle, size, offset);
}
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes