2012-04-16 16:02:45 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "mozilla/layers/PLayersChild.h"
|
|
|
|
#include "BasicTiledThebesLayer.h"
|
|
|
|
#include "gfxImageSurface.h"
|
|
|
|
#include "sampler.h"
|
2012-08-19 12:33:25 -07:00
|
|
|
#include "gfxPlatform.h"
|
2012-04-16 16:02:45 -07:00
|
|
|
|
|
|
|
#ifdef GFX_TILEDLAYER_DEBUG_OVERLAY
|
|
|
|
#include "cairo.h"
|
|
|
|
#include <sstream>
|
|
|
|
using mozilla::layers::Layer;
|
|
|
|
static void DrawDebugOverlay(gfxImageSurface* imgSurf, int x, int y)
|
|
|
|
{
|
|
|
|
gfxContext c(imgSurf);
|
|
|
|
|
|
|
|
// Draw border
|
|
|
|
c.NewPath();
|
|
|
|
c.SetDeviceColor(gfxRGBA(0.0, 0.0, 0.0, 1.0));
|
|
|
|
c.Rectangle(gfxRect(gfxPoint(0,0),imgSurf->GetSize()));
|
|
|
|
c.Stroke();
|
|
|
|
|
|
|
|
// Build tile description
|
|
|
|
std::stringstream ss;
|
|
|
|
ss << x << ", " << y;
|
|
|
|
|
|
|
|
// Draw text using cairo toy text API
|
|
|
|
cairo_t* cr = c.GetCairo();
|
2012-10-03 07:56:41 -07:00
|
|
|
cairo_set_font_size(cr, 25);
|
2012-04-16 16:02:45 -07:00
|
|
|
cairo_text_extents_t extents;
|
|
|
|
cairo_text_extents(cr, ss.str().c_str(), &extents);
|
|
|
|
|
|
|
|
int textWidth = extents.width + 6;
|
|
|
|
|
|
|
|
c.NewPath();
|
|
|
|
c.SetDeviceColor(gfxRGBA(0.0, 0.0, 0.0, 1.0));
|
2012-10-03 07:56:41 -07:00
|
|
|
c.Rectangle(gfxRect(gfxPoint(2,2),gfxSize(textWidth, 30)));
|
2012-04-16 16:02:45 -07:00
|
|
|
c.Fill();
|
|
|
|
|
|
|
|
c.NewPath();
|
|
|
|
c.SetDeviceColor(gfxRGBA(1.0, 0.0, 0.0, 1.0));
|
2012-10-03 07:56:41 -07:00
|
|
|
c.Rectangle(gfxRect(gfxPoint(2,2),gfxSize(textWidth, 30)));
|
2012-04-16 16:02:45 -07:00
|
|
|
c.Stroke();
|
|
|
|
|
|
|
|
c.NewPath();
|
2012-10-03 07:56:41 -07:00
|
|
|
cairo_move_to(cr, 4, 28);
|
2012-04-16 16:02:45 -07:00
|
|
|
cairo_show_text(cr, ss.str().c_str());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
2012-09-04 15:05:31 -07:00
|
|
|
bool
|
|
|
|
BasicTiledLayerBuffer::HasFormatChanged(BasicTiledThebesLayer* aThebesLayer) const
|
|
|
|
{
|
|
|
|
return aThebesLayer->CanUseOpaqueSurface() != mLastPaintOpaque;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-04-16 16:04:24 -07:00
|
|
|
gfxASurface::gfxImageFormat
|
|
|
|
BasicTiledLayerBuffer::GetFormat() const
|
|
|
|
{
|
|
|
|
if (mThebesLayer->CanUseOpaqueSurface()) {
|
|
|
|
return gfxASurface::ImageFormatRGB16_565;
|
|
|
|
} else {
|
|
|
|
return gfxASurface::ImageFormatARGB32;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-16 16:02:45 -07:00
|
|
|
void
|
|
|
|
BasicTiledLayerBuffer::PaintThebes(BasicTiledThebesLayer* aLayer,
|
|
|
|
const nsIntRegion& aNewValidRegion,
|
|
|
|
const nsIntRegion& aPaintRegion,
|
|
|
|
LayerManager::DrawThebesLayerCallback aCallback,
|
2012-03-18 16:02:38 -07:00
|
|
|
void* aCallbackData)
|
2012-04-16 16:02:45 -07:00
|
|
|
{
|
|
|
|
mThebesLayer = aLayer;
|
|
|
|
mCallback = aCallback;
|
|
|
|
mCallbackData = aCallbackData;
|
|
|
|
|
|
|
|
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
|
|
|
|
long start = PR_IntervalNow();
|
|
|
|
#endif
|
2012-10-03 07:28:04 -07:00
|
|
|
|
|
|
|
// If this region is empty XMost() - 1 will give us a negative value.
|
|
|
|
NS_ASSERTION(!aPaintRegion.GetBounds().IsEmpty(), "Empty paint region\n");
|
|
|
|
|
|
|
|
bool useSinglePaintBuffer = UseSinglePaintBuffer();
|
|
|
|
if (useSinglePaintBuffer) {
|
|
|
|
// Check if the paint only spans a single tile. If that's
|
|
|
|
// the case there's no point in using a single paint buffer.
|
|
|
|
nsIntRect paintBounds = aPaintRegion.GetBounds();
|
|
|
|
useSinglePaintBuffer = GetTileStart(paintBounds.x) !=
|
|
|
|
GetTileStart(paintBounds.XMost() - 1) ||
|
|
|
|
GetTileStart(paintBounds.y) !=
|
|
|
|
GetTileStart(paintBounds.YMost() - 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (useSinglePaintBuffer) {
|
2012-04-16 16:02:45 -07:00
|
|
|
const nsIntRect bounds = aPaintRegion.GetBounds();
|
2012-04-18 17:40:08 -07:00
|
|
|
{
|
|
|
|
SAMPLE_LABEL("BasicTiledLayerBuffer", "PaintThebesSingleBufferAlloc");
|
|
|
|
mSinglePaintBuffer = new gfxImageSurface(gfxIntSize(bounds.width, bounds.height), GetFormat(), !aLayer->CanUseOpaqueSurface());
|
|
|
|
mSinglePaintBufferOffset = nsIntPoint(bounds.x, bounds.y);
|
|
|
|
}
|
2012-04-16 16:02:45 -07:00
|
|
|
nsRefPtr<gfxContext> ctxt = new gfxContext(mSinglePaintBuffer);
|
|
|
|
ctxt->NewPath();
|
|
|
|
ctxt->Translate(gfxPoint(-bounds.x, -bounds.y));
|
|
|
|
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
|
|
|
|
if (PR_IntervalNow() - start > 3) {
|
|
|
|
printf_stderr("Slow alloc %i\n", PR_IntervalNow() - start);
|
|
|
|
}
|
|
|
|
start = PR_IntervalNow();
|
|
|
|
#endif
|
2012-04-18 17:40:08 -07:00
|
|
|
SAMPLE_LABEL("BasicTiledLayerBuffer", "PaintThebesSingleBufferDraw");
|
2012-02-07 14:27:21 -08:00
|
|
|
|
2012-05-15 13:34:06 -07:00
|
|
|
mCallback(mThebesLayer, ctxt, aPaintRegion, nsIntRegion(), mCallbackData);
|
2012-04-16 16:02:45 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
|
|
|
|
if (PR_IntervalNow() - start > 30) {
|
|
|
|
const nsIntRect bounds = aPaintRegion.GetBounds();
|
|
|
|
printf_stderr("Time to draw %i: %i, %i, %i, %i\n", PR_IntervalNow() - start, bounds.x, bounds.y, bounds.width, bounds.height);
|
|
|
|
if (aPaintRegion.IsComplex()) {
|
|
|
|
printf_stderr("Complex region\n");
|
|
|
|
nsIntRegionRectIterator it(aPaintRegion);
|
2012-07-30 07:20:58 -07:00
|
|
|
for (const nsIntRect* rect = it.Next(); rect != nullptr; rect = it.Next()) {
|
2012-04-16 16:02:45 -07:00
|
|
|
printf_stderr(" rect %i, %i, %i, %i\n", rect->x, rect->y, rect->width, rect->height);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
start = PR_IntervalNow();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
SAMPLE_LABEL("BasicTiledLayerBuffer", "PaintThebesUpdate");
|
|
|
|
Update(aNewValidRegion, aPaintRegion);
|
|
|
|
|
|
|
|
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
|
|
|
|
if (PR_IntervalNow() - start > 10) {
|
|
|
|
const nsIntRect bounds = aPaintRegion.GetBounds();
|
|
|
|
printf_stderr("Time to tile %i: %i, %i, %i, %i\n", PR_IntervalNow() - start, bounds.x, bounds.y, bounds.width, bounds.height);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-09-04 15:05:31 -07:00
|
|
|
mLastPaintOpaque = mThebesLayer->CanUseOpaqueSurface();
|
2012-07-30 07:20:58 -07:00
|
|
|
mThebesLayer = nullptr;
|
|
|
|
mCallback = nullptr;
|
|
|
|
mCallbackData = nullptr;
|
|
|
|
mSinglePaintBuffer = nullptr;
|
2012-04-16 16:02:45 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
BasicTiledLayerTile
|
|
|
|
BasicTiledLayerBuffer::ValidateTileInternal(BasicTiledLayerTile aTile,
|
|
|
|
const nsIntPoint& aTileOrigin,
|
|
|
|
const nsIntRect& aDirtyRect)
|
|
|
|
{
|
2012-08-30 12:35:36 -07:00
|
|
|
if (aTile == GetPlaceholderTile() || aTile.mSurface->Format() != GetFormat()) {
|
2012-04-16 16:04:24 -07:00
|
|
|
gfxImageSurface* tmpTile = new gfxImageSurface(gfxIntSize(GetTileLength(), GetTileLength()),
|
2012-04-18 17:40:08 -07:00
|
|
|
GetFormat(), !mThebesLayer->CanUseOpaqueSurface());
|
2012-04-16 16:02:45 -07:00
|
|
|
aTile = BasicTiledLayerTile(tmpTile);
|
|
|
|
}
|
|
|
|
|
|
|
|
gfxRect drawRect(aDirtyRect.x - aTileOrigin.x, aDirtyRect.y - aTileOrigin.y,
|
|
|
|
aDirtyRect.width, aDirtyRect.height);
|
|
|
|
|
|
|
|
// Use the gfxReusableSurfaceWrapper, which will reuse the surface
|
|
|
|
// if the compositor no longer has a read lock, otherwise the surface
|
|
|
|
// will be copied into a new writable surface.
|
|
|
|
gfxImageSurface* writableSurface;
|
|
|
|
aTile.mSurface = aTile.mSurface->GetWritable(&writableSurface);
|
|
|
|
|
|
|
|
// Bug 742100, this gfxContext really should live on the stack.
|
|
|
|
nsRefPtr<gfxContext> ctxt = new gfxContext(writableSurface);
|
|
|
|
if (mSinglePaintBuffer) {
|
2012-10-03 07:28:04 -07:00
|
|
|
ctxt->SetOperator(gfxContext::OPERATOR_SOURCE);
|
2012-04-16 16:02:45 -07:00
|
|
|
ctxt->NewPath();
|
|
|
|
ctxt->SetSource(mSinglePaintBuffer.get(),
|
|
|
|
gfxPoint(mSinglePaintBufferOffset.x - aDirtyRect.x + drawRect.x,
|
|
|
|
mSinglePaintBufferOffset.y - aDirtyRect.y + drawRect.y));
|
|
|
|
ctxt->Rectangle(drawRect, true);
|
|
|
|
ctxt->Fill();
|
|
|
|
} else {
|
|
|
|
ctxt->NewPath();
|
|
|
|
ctxt->Translate(gfxPoint(-aTileOrigin.x, -aTileOrigin.y));
|
|
|
|
nsIntPoint a = aTileOrigin;
|
2012-10-03 07:28:04 -07:00
|
|
|
mCallback(mThebesLayer, ctxt, nsIntRegion(nsIntRect(a, nsIntSize(GetTileLength(), GetTileLength()))), nsIntRegion(), mCallbackData);
|
2012-04-16 16:02:45 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef GFX_TILEDLAYER_DEBUG_OVERLAY
|
|
|
|
DrawDebugOverlay(writableSurface, aTileOrigin.x, aTileOrigin.y);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return aTile;
|
|
|
|
}
|
|
|
|
|
|
|
|
BasicTiledLayerTile
|
|
|
|
BasicTiledLayerBuffer::ValidateTile(BasicTiledLayerTile aTile,
|
|
|
|
const nsIntPoint& aTileOrigin,
|
|
|
|
const nsIntRegion& aDirtyRegion)
|
|
|
|
{
|
|
|
|
|
|
|
|
SAMPLE_LABEL("BasicTiledLayerBuffer", "ValidateTile");
|
|
|
|
|
|
|
|
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
|
|
|
|
if (aDirtyRegion.IsComplex()) {
|
|
|
|
printf_stderr("Complex region\n");
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
nsIntRegionRectIterator it(aDirtyRegion);
|
2012-07-30 07:20:58 -07:00
|
|
|
for (const nsIntRect* rect = it.Next(); rect != nullptr; rect = it.Next()) {
|
2012-04-16 16:02:45 -07:00
|
|
|
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
|
|
|
|
printf_stderr(" break into subrect %i, %i, %i, %i\n", rect->x, rect->y, rect->width, rect->height);
|
|
|
|
#endif
|
|
|
|
aTile = ValidateTileInternal(aTile, aTileOrigin, *rect);
|
|
|
|
}
|
|
|
|
|
|
|
|
return aTile;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
BasicTiledThebesLayer::FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
|
|
|
|
{
|
|
|
|
aAttrs = ThebesLayerAttributes(GetValidRegion());
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
BasicTiledThebesLayer::PaintThebes(gfxContext* aContext,
|
2012-07-06 11:02:10 -07:00
|
|
|
Layer* aMaskLayer,
|
2012-04-16 16:02:45 -07:00
|
|
|
LayerManager::DrawThebesLayerCallback aCallback,
|
|
|
|
void* aCallbackData,
|
|
|
|
ReadbackProcessor* aReadback)
|
|
|
|
{
|
|
|
|
if (!aCallback) {
|
|
|
|
BasicManager()->SetTransactionIncomplete();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!HasShadow()) {
|
|
|
|
NS_ASSERTION(false, "Shadow requested for painting\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-09-04 15:05:31 -07:00
|
|
|
if (mTiledBuffer.HasFormatChanged(this)) {
|
|
|
|
mValidRegion = nsIntRegion();
|
|
|
|
}
|
|
|
|
|
2012-04-16 16:02:45 -07:00
|
|
|
nsIntRegion regionToPaint = mVisibleRegion;
|
|
|
|
regionToPaint.Sub(regionToPaint, mValidRegion);
|
|
|
|
if (regionToPaint.IsEmpty())
|
|
|
|
return;
|
|
|
|
|
2012-09-25 12:13:40 -07:00
|
|
|
gfxSize resolution(1, 1);
|
|
|
|
for (ContainerLayer* parent = GetParent(); parent; parent = parent->GetParent()) {
|
|
|
|
const FrameMetrics& metrics = parent->GetFrameMetrics();
|
|
|
|
resolution.width *= metrics.mResolution.width;
|
|
|
|
resolution.height *= metrics.mResolution.height;
|
|
|
|
}
|
|
|
|
|
2012-09-26 13:42:09 -07:00
|
|
|
// Calculate the scroll offset since the last transaction. Progressive tile
|
|
|
|
// painting is only used when scrolling.
|
|
|
|
gfx::Point scrollOffset(0, 0);
|
|
|
|
Layer* primaryScrollable = BasicManager()->GetPrimaryScrollableLayer();
|
|
|
|
if (primaryScrollable) {
|
|
|
|
const FrameMetrics& metrics = primaryScrollable->AsContainerLayer()->GetFrameMetrics();
|
2012-09-28 19:16:34 -07:00
|
|
|
scrollOffset = metrics.mScrollOffset;
|
2012-09-26 13:42:09 -07:00
|
|
|
}
|
|
|
|
int32_t scrollDiffX = scrollOffset.x - mLastScrollOffset.x;
|
|
|
|
int32_t scrollDiffY = scrollOffset.y - mLastScrollOffset.y;
|
|
|
|
|
|
|
|
// Only draw progressively when we're panning and the resolution is unchanged.
|
2012-09-25 12:13:40 -07:00
|
|
|
if (gfxPlatform::UseProgressiveTilePainting() &&
|
2012-09-26 13:42:09 -07:00
|
|
|
mTiledBuffer.GetResolution() == resolution &&
|
|
|
|
(scrollDiffX != 0 || scrollDiffY != 0)) {
|
2012-09-26 13:41:41 -07:00
|
|
|
// Paint tiles that have no content before tiles that only have stale content.
|
|
|
|
nsIntRegion staleRegion = mTiledBuffer.GetValidRegion();
|
|
|
|
staleRegion.And(staleRegion, regionToPaint);
|
2012-10-04 11:45:16 -07:00
|
|
|
bool hasNewContent = !staleRegion.Contains(regionToPaint);
|
|
|
|
if (!staleRegion.IsEmpty() && hasNewContent) {
|
2012-09-26 13:41:41 -07:00
|
|
|
regionToPaint.Sub(regionToPaint, staleRegion);
|
|
|
|
}
|
|
|
|
|
2012-10-15 01:33:34 -07:00
|
|
|
// Find out the current view transform to determine which tiles to draw
|
|
|
|
// first, and see if we should just abort this paint. Aborting is usually
|
|
|
|
// caused by there being an incoming, more relevant paint.
|
|
|
|
gfx::Rect viewport;
|
|
|
|
float scaleX, scaleY;
|
|
|
|
if (BasicManager()->ProgressiveUpdateCallback(hasNewContent, viewport, scaleX, scaleY)) {
|
2012-10-04 11:45:16 -07:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-09-26 13:41:56 -07:00
|
|
|
// The following code decides what order to draw tiles in, based on the
|
|
|
|
// current scroll direction of the primary scrollable layer.
|
|
|
|
// XXX While this code is of a reasonable size currently, it is likely
|
|
|
|
// we'll want to add more comprehensive methods of deciding what
|
|
|
|
// tiles to draw. This is a good candidate for splitting out into a
|
|
|
|
// separate function.
|
|
|
|
|
|
|
|
// First, decide whether to iterate on the region from the beginning or end
|
|
|
|
// of the rect list. This relies on the specific behaviour of nsRegion when
|
|
|
|
// subtracting rects. If we're moving more in the X direction, we draw
|
|
|
|
// tiles by column, otherwise by row.
|
2012-07-06 11:02:10 -07:00
|
|
|
nsIntRegionRectIterator it(regionToPaint);
|
2012-09-26 13:41:56 -07:00
|
|
|
const nsIntRect* rect;
|
|
|
|
if ((NS_ABS(scrollDiffY) > NS_ABS(scrollDiffX) && scrollDiffY >= 0)) {
|
|
|
|
rect = it.Next();
|
|
|
|
} else {
|
|
|
|
const nsIntRect* lastRect;
|
2012-10-03 16:36:10 -07:00
|
|
|
while ((lastRect = it.Next())) {
|
2012-09-26 13:41:56 -07:00
|
|
|
rect = lastRect;
|
|
|
|
}
|
|
|
|
}
|
2012-07-06 11:02:10 -07:00
|
|
|
|
2012-09-26 13:41:56 -07:00
|
|
|
// Second, decide what direction to start drawing rects from by checking
|
|
|
|
// the scroll offset difference of the primary scrollable layer. If we're
|
|
|
|
// scrolling to the right, make sure to start from the left, downwards
|
|
|
|
// start from the top, etc.
|
|
|
|
int paintTileStartX, paintTileStartY;
|
|
|
|
if (scrollOffset.x >= mLastScrollOffset.x) {
|
|
|
|
paintTileStartX = mTiledBuffer.RoundDownToTileEdge(rect->x);
|
|
|
|
} else {
|
|
|
|
paintTileStartX = mTiledBuffer.RoundDownToTileEdge(rect->XMost() - 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (scrollOffset.y >= mLastScrollOffset.y) {
|
|
|
|
paintTileStartY = mTiledBuffer.RoundDownToTileEdge(rect->y);
|
|
|
|
} else {
|
|
|
|
paintTileStartY = mTiledBuffer.RoundDownToTileEdge(rect->YMost() - 1);
|
|
|
|
}
|
2012-07-06 11:02:10 -07:00
|
|
|
|
|
|
|
nsIntRegion maxPaint(
|
|
|
|
nsIntRect(paintTileStartX, paintTileStartY,
|
|
|
|
mTiledBuffer.GetTileLength(), mTiledBuffer.GetTileLength()));
|
|
|
|
|
|
|
|
if (!maxPaint.Contains(regionToPaint)) {
|
|
|
|
// The region needed to paint is larger then our progressive chunk size
|
|
|
|
// therefore update what we want to paint and ask for a new paint transaction.
|
|
|
|
regionToPaint.And(regionToPaint, maxPaint);
|
|
|
|
BasicManager()->SetRepeatTransaction();
|
|
|
|
|
2012-09-25 12:13:40 -07:00
|
|
|
// Make sure that tiles that fall outside of the visible region are discarded.
|
|
|
|
mValidRegion.And(mValidRegion, mVisibleRegion);
|
2012-09-26 13:41:56 -07:00
|
|
|
} else {
|
|
|
|
// The transaction is completed, store the last scroll offset.
|
|
|
|
mLastScrollOffset = scrollOffset;
|
2012-07-06 11:02:10 -07:00
|
|
|
}
|
|
|
|
|
2012-09-25 12:13:40 -07:00
|
|
|
// Keep track of what we're about to refresh.
|
2012-07-06 11:02:10 -07:00
|
|
|
mValidRegion.Or(mValidRegion, regionToPaint);
|
|
|
|
} else {
|
2012-09-25 12:13:40 -07:00
|
|
|
mTiledBuffer.SetResolution(resolution);
|
2012-07-06 11:02:10 -07:00
|
|
|
mValidRegion = mVisibleRegion;
|
|
|
|
}
|
|
|
|
|
2012-10-04 11:45:16 -07:00
|
|
|
mTiledBuffer.PaintThebes(this, mValidRegion, regionToPaint, aCallback, aCallbackData);
|
2012-09-25 12:13:40 -07:00
|
|
|
|
2012-04-16 16:02:45 -07:00
|
|
|
mTiledBuffer.ReadLock();
|
2012-03-18 16:02:38 -07:00
|
|
|
if (aMaskLayer) {
|
|
|
|
static_cast<BasicImplData*>(aMaskLayer->ImplData())
|
2012-07-30 07:20:58 -07:00
|
|
|
->Paint(aContext, nullptr);
|
2012-03-18 16:02:38 -07:00
|
|
|
}
|
2012-04-16 16:02:45 -07:00
|
|
|
|
2012-05-01 12:59:41 -07:00
|
|
|
// Create a heap copy owned and released by the compositor. This is needed
|
|
|
|
// since we're sending this over an async message and content needs to be
|
|
|
|
// be able to modify the tiled buffer in the next transaction.
|
|
|
|
// TODO: Remove me once Bug 747811 lands.
|
|
|
|
BasicTiledLayerBuffer *heapCopy = new BasicTiledLayerBuffer(mTiledBuffer);
|
|
|
|
|
|
|
|
BasicManager()->PaintedTiledLayerBuffer(BasicManager()->Hold(this), heapCopy);
|
2012-04-16 16:02:45 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
} // mozilla
|
|
|
|
} // layers
|