2012-06-28 23:01:34 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* 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/. */
|
|
|
|
|
2013-04-24 11:42:40 -07:00
|
|
|
#include "mozilla/layers/PLayerTransactionParent.h"
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
#include "BasicCanvasLayer.h"
|
2012-06-28 23:01:34 -07:00
|
|
|
#include "gfxImageSurface.h"
|
|
|
|
#include "GLContext.h"
|
|
|
|
#include "gfxUtils.h"
|
2012-08-19 12:33:25 -07:00
|
|
|
#include "gfxPlatform.h"
|
2012-08-21 20:29:06 -07:00
|
|
|
#include "mozilla/Preferences.h"
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
#include "BasicLayersImpl.h"
|
2013-02-13 15:26:24 -08:00
|
|
|
#include "SurfaceStream.h"
|
|
|
|
#include "SharedSurfaceGL.h"
|
|
|
|
#include "SharedSurfaceEGL.h"
|
2013-03-15 17:48:56 -07:00
|
|
|
#include "GeckoProfiler.h"
|
2012-06-28 23:01:34 -07:00
|
|
|
|
2012-05-31 18:30:08 -07:00
|
|
|
#include "nsXULAppAPI.h"
|
2012-06-28 23:01:34 -07:00
|
|
|
|
|
|
|
using namespace mozilla::gfx;
|
2012-10-25 13:12:59 -07:00
|
|
|
using namespace mozilla::gl;
|
2012-06-28 23:01:34 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
2012-07-10 08:06:42 -07:00
|
|
|
namespace layers {
|
|
|
|
|
2012-06-28 23:01:34 -07:00
|
|
|
void
|
|
|
|
BasicCanvasLayer::Paint(gfxContext* aContext, Layer* aMaskLayer)
|
|
|
|
{
|
|
|
|
if (IsHidden())
|
|
|
|
return;
|
2013-02-13 15:26:24 -08:00
|
|
|
|
|
|
|
FirePreTransactionCallback();
|
2012-06-28 23:01:34 -07:00
|
|
|
UpdateSurface();
|
|
|
|
FireDidTransactionCallback();
|
2013-02-13 15:26:24 -08:00
|
|
|
|
2013-04-30 22:03:25 -07:00
|
|
|
PaintWithOpacity(aContext, GetEffectiveOpacity(), aMaskLayer, GetOperator());
|
2012-06-28 23:01:34 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<CanvasLayer>
|
|
|
|
BasicLayerManager::CreateCanvasLayer()
|
|
|
|
{
|
|
|
|
NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
|
|
|
|
nsRefPtr<CanvasLayer> layer = new BasicCanvasLayer(this);
|
|
|
|
return layer.forget();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|