Commit 6f270615 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[BlackBerry] Include accelerated compositing layers in screen captures.

https://bugs.webkit.org/show_bug.cgi?id=113335

Patch by Mike Lattanzio <mlattanzio@blackberry.com> on 2013-03-26
Reviewed by Rob Buis.

PR# 280374
Include accelerated compositing layers in screen captures.
Reviewed Internally By: Jakob Petsovits

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::render):
(BlackBerry::WebKit::BackingStorePrivate::renderContents):
(BlackBerry::WebKit::BackingStore::drawContents):
* Api/BackingStore_p.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a6734fcb
......@@ -1079,7 +1079,7 @@ TileIndexList BackingStorePrivate::render(const TileIndexList& tileIndexList)
const Platform::FloatPoint documentDirtyRectOrigin = viewportAccessor->toDocumentContents(dirtyRect.location(), currentScale);
const Platform::IntRect dstRect(dirtyRect.location() - tileOrigin, dirtyRect.size());
if (!renderContents(nativeBuffer, dstRect, currentScale, documentDirtyRectOrigin))
if (!renderContents(nativeBuffer, dstRect, currentScale, documentDirtyRectOrigin, RenderRootLayer))
continue;
// Add the newly rendered region to the tile so it can keep track for blits.
......@@ -1818,7 +1818,7 @@ Platform::IntSize BackingStorePrivate::tileSize()
return tileSize;
}
bool BackingStorePrivate::renderContents(BlackBerry::Platform::Graphics::Buffer* targetBuffer, const Platform::IntRect& dstRect, double scale, const Platform::FloatPoint& documentRenderOrigin) const
bool BackingStorePrivate::renderContents(BlackBerry::Platform::Graphics::Buffer* targetBuffer, const Platform::IntRect& dstRect, double scale, const Platform::FloatPoint& documentRenderOrigin, LayersToRender layersToRender) const
{
#if DEBUG_BACKINGSTORE
Platform::logAlways(Platform::LogLevelCritical,
......@@ -1898,7 +1898,10 @@ bool BackingStorePrivate::renderContents(BlackBerry::Platform::Graphics::Buffer*
}
// Let WebCore render the page contents into the drawing surface.
m_client->frame()->view()->paintContents(&graphicsContext, renderedRect);
if (layersToRender == RenderRootLayer)
m_client->frame()->view()->paintContents(&graphicsContext, renderedRect);
else
m_client->frame()->view()->paintContentsForSnapshot(&graphicsContext, renderedRect, FrameView::ExcludeSelection, FrameView::DocumentCoordinates);
graphicsContext.restore();
}
......@@ -2316,7 +2319,7 @@ bool BackingStore::drawContents(Platform::Graphics::Buffer* buffer, const Platfo
d->requestLayoutIfNeeded();
return d->renderContents(buffer, dstRect, scale, documentScrollPosition);
return d->renderContents(buffer, dstRect, scale, documentScrollPosition, BackingStorePrivate::RenderAllLayers);
}
}
......
......@@ -275,7 +275,8 @@ public:
static Platform::IntSize tileSize();
// This takes transformed contents coordinates.
bool renderContents(BlackBerry::Platform::Graphics::Buffer*, const BlackBerry::Platform::IntRect& dstRect, double scale, const BlackBerry::Platform::FloatPoint& documentScrollPosition) const;
enum LayersToRender { RenderRootLayer, RenderAllLayers };
bool renderContents(BlackBerry::Platform::Graphics::Buffer*, const BlackBerry::Platform::IntRect& dstRect, double scale, const BlackBerry::Platform::FloatPoint& documentScrollPosition, LayersToRender) const;
void blitToWindow(const Platform::IntRect& dstRect, const BlackBerry::Platform::Graphics::Buffer* srcBuffer, const Platform::IntRect& srcRect, BlackBerry::Platform::Graphics::BlendMode, unsigned char globalAlpha);
void fillWindow(Platform::Graphics::FillPattern, const Platform::IntRect& dstRect, const Platform::IntPoint& contentsOrigin, double contentsScale);
......
2013-03-26 Mike Lattanzio <mlattanzio@blackberry.com>
[BlackBerry] Include accelerated compositing layers in screen captures.
https://bugs.webkit.org/show_bug.cgi?id=113335
Reviewed by Rob Buis.
PR# 280374
Include accelerated compositing layers in screen captures.
Reviewed Internally By: Jakob Petsovits
* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::render):
(BlackBerry::WebKit::BackingStorePrivate::renderContents):
(BlackBerry::WebKit::BackingStore::drawContents):
* Api/BackingStore_p.h:
2013-03-26 Tiancheng Jiang <tijiang@rim.com>
 
[BlackBerry] Set mouse document position for mouse event in updateCursor
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment