2010-05-25 06:35:35 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2010-03-30 04:48:52 +00:00
|
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is Mozilla Corporation code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Mozilla Foundation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2009
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Bas Schouten <bschouten@mozilla.org>
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
#include "ContainerLayerOGL.h"
|
2010-11-30 05:51:56 +00:00
|
|
|
#include "gfxUtils.h"
|
2010-03-30 04:48:52 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
2010-10-13 22:55:45 +00:00
|
|
|
template<class Container>
|
|
|
|
static void
|
|
|
|
ContainerInsertAfter(Container* aContainer, Layer* aChild, Layer* aAfter)
|
2010-08-07 05:09:18 +00:00
|
|
|
{
|
2010-10-13 22:55:45 +00:00
|
|
|
aChild->SetParent(aContainer);
|
2010-03-30 04:48:52 +00:00
|
|
|
if (!aAfter) {
|
2010-10-13 22:55:45 +00:00
|
|
|
Layer *oldFirstChild = aContainer->GetFirstChild();
|
|
|
|
aContainer->mFirstChild = aChild;
|
2010-05-26 04:06:34 +00:00
|
|
|
aChild->SetNextSibling(oldFirstChild);
|
|
|
|
aChild->SetPrevSibling(nsnull);
|
|
|
|
if (oldFirstChild) {
|
|
|
|
oldFirstChild->SetPrevSibling(aChild);
|
2010-11-16 23:33:56 +00:00
|
|
|
} else {
|
|
|
|
aContainer->mLastChild = aChild;
|
2010-05-26 04:06:34 +00:00
|
|
|
}
|
2010-05-24 02:25:58 +00:00
|
|
|
NS_ADDREF(aChild);
|
2011-02-16 22:43:30 +00:00
|
|
|
aContainer->DidInsertChild(aChild);
|
2010-03-30 04:48:52 +00:00
|
|
|
return;
|
|
|
|
}
|
2010-10-13 22:55:45 +00:00
|
|
|
for (Layer *child = aContainer->GetFirstChild();
|
2010-05-26 04:06:34 +00:00
|
|
|
child; child = child->GetNextSibling()) {
|
|
|
|
if (aAfter == child) {
|
|
|
|
Layer *oldNextSibling = child->GetNextSibling();
|
|
|
|
child->SetNextSibling(aChild);
|
|
|
|
aChild->SetNextSibling(oldNextSibling);
|
|
|
|
if (oldNextSibling) {
|
|
|
|
oldNextSibling->SetPrevSibling(aChild);
|
2010-11-16 23:33:56 +00:00
|
|
|
} else {
|
|
|
|
aContainer->mLastChild = aChild;
|
2010-05-26 04:06:34 +00:00
|
|
|
}
|
|
|
|
aChild->SetPrevSibling(child);
|
2010-05-24 02:25:58 +00:00
|
|
|
NS_ADDREF(aChild);
|
2011-02-16 22:43:30 +00:00
|
|
|
aContainer->DidInsertChild(aChild);
|
2010-03-30 04:48:52 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
NS_WARNING("Failed to find aAfter layer!");
|
|
|
|
}
|
|
|
|
|
2010-10-13 22:55:45 +00:00
|
|
|
template<class Container>
|
|
|
|
static void
|
|
|
|
ContainerRemoveChild(Container* aContainer, Layer* aChild)
|
2010-03-30 04:48:52 +00:00
|
|
|
{
|
2010-10-13 22:55:45 +00:00
|
|
|
if (aContainer->GetFirstChild() == aChild) {
|
|
|
|
aContainer->mFirstChild = aContainer->GetFirstChild()->GetNextSibling();
|
|
|
|
if (aContainer->mFirstChild) {
|
|
|
|
aContainer->mFirstChild->SetPrevSibling(nsnull);
|
2010-11-16 23:33:56 +00:00
|
|
|
} else {
|
|
|
|
aContainer->mLastChild = nsnull;
|
2010-05-26 04:06:34 +00:00
|
|
|
}
|
|
|
|
aChild->SetNextSibling(nsnull);
|
|
|
|
aChild->SetPrevSibling(nsnull);
|
|
|
|
aChild->SetParent(nsnull);
|
2011-02-16 22:43:30 +00:00
|
|
|
aContainer->DidRemoveChild(aChild);
|
2010-05-21 03:20:48 +00:00
|
|
|
NS_RELEASE(aChild);
|
2010-03-30 04:48:52 +00:00
|
|
|
return;
|
|
|
|
}
|
2010-05-26 04:06:34 +00:00
|
|
|
Layer *lastChild = nsnull;
|
2010-10-13 22:55:45 +00:00
|
|
|
for (Layer *child = aContainer->GetFirstChild(); child;
|
2010-05-26 04:06:34 +00:00
|
|
|
child = child->GetNextSibling()) {
|
|
|
|
if (child == aChild) {
|
2010-03-30 04:48:52 +00:00
|
|
|
// We're sure this is not our first child. So lastChild != NULL.
|
|
|
|
lastChild->SetNextSibling(child->GetNextSibling());
|
2010-05-26 04:06:34 +00:00
|
|
|
if (child->GetNextSibling()) {
|
|
|
|
child->GetNextSibling()->SetPrevSibling(lastChild);
|
2010-11-16 23:33:56 +00:00
|
|
|
} else {
|
|
|
|
aContainer->mLastChild = lastChild;
|
2010-05-26 04:06:34 +00:00
|
|
|
}
|
|
|
|
child->SetNextSibling(nsnull);
|
|
|
|
child->SetPrevSibling(nsnull);
|
|
|
|
child->SetParent(nsnull);
|
2011-02-16 22:43:30 +00:00
|
|
|
aContainer->DidRemoveChild(aChild);
|
2010-05-21 03:20:48 +00:00
|
|
|
NS_RELEASE(aChild);
|
2010-03-30 04:48:52 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
lastChild = child;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-13 22:55:45 +00:00
|
|
|
template<class Container>
|
|
|
|
static void
|
|
|
|
ContainerDestroy(Container* aContainer)
|
|
|
|
{
|
|
|
|
if (!aContainer->mDestroyed) {
|
|
|
|
while (aContainer->mFirstChild) {
|
|
|
|
aContainer->GetFirstChildOGL()->Destroy();
|
|
|
|
aContainer->RemoveChild(aContainer->mFirstChild);
|
|
|
|
}
|
|
|
|
aContainer->mDestroyed = PR_TRUE;
|
2010-03-30 04:48:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-11-30 05:51:56 +00:00
|
|
|
static inline LayerOGL*
|
|
|
|
GetNextSibling(LayerOGL* aLayer)
|
|
|
|
{
|
|
|
|
Layer* layer = aLayer->GetLayer()->GetNextSibling();
|
|
|
|
return layer ? static_cast<LayerOGL*>(layer->
|
|
|
|
ImplData())
|
|
|
|
: nsnull;
|
|
|
|
}
|
|
|
|
|
2011-01-18 07:22:25 +00:00
|
|
|
static PRBool
|
|
|
|
HasOpaqueAncestorLayer(Layer* aLayer)
|
|
|
|
{
|
|
|
|
for (Layer* l = aLayer->GetParent(); l; l = l->GetParent()) {
|
|
|
|
if (l->GetContentFlags() & Layer::CONTENT_OPAQUE)
|
|
|
|
return PR_TRUE;
|
|
|
|
}
|
|
|
|
return PR_FALSE;
|
|
|
|
}
|
|
|
|
|
2010-10-13 22:55:45 +00:00
|
|
|
template<class Container>
|
|
|
|
static void
|
|
|
|
ContainerRender(Container* aContainer,
|
|
|
|
int aPreviousFrameBuffer,
|
|
|
|
const nsIntPoint& aOffset,
|
|
|
|
LayerManagerOGL* aManager)
|
2010-03-30 04:48:52 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Setup our temporary texture for rendering the contents of this container.
|
|
|
|
*/
|
|
|
|
GLuint containerSurface;
|
|
|
|
GLuint frameBuffer;
|
2010-05-25 06:35:35 +00:00
|
|
|
|
|
|
|
nsIntPoint childOffset(aOffset);
|
2010-10-13 22:55:45 +00:00
|
|
|
nsIntRect visibleRect = aContainer->GetEffectiveVisibleRegion().GetBounds();
|
2010-03-30 04:48:52 +00:00
|
|
|
|
2011-05-14 00:11:37 +00:00
|
|
|
gfxMatrix worldTransform = aManager->GetWorldTransform();
|
|
|
|
|
2010-11-08 09:06:14 +00:00
|
|
|
nsIntRect cachedScissor = aContainer->gl()->ScissorRect();
|
2010-10-13 22:55:45 +00:00
|
|
|
aContainer->gl()->PushScissorRect();
|
2011-01-18 07:22:25 +00:00
|
|
|
aContainer->mSupportsComponentAlphaChildren = PR_FALSE;
|
2010-09-14 04:30:00 +00:00
|
|
|
|
2010-11-08 09:06:15 +00:00
|
|
|
float opacity = aContainer->GetEffectiveOpacity();
|
|
|
|
const gfx3DMatrix& transform = aContainer->GetEffectiveTransform();
|
|
|
|
bool needsFramebuffer = aContainer->UseIntermediateSurface();
|
2010-11-30 06:02:46 +00:00
|
|
|
gfxMatrix contTransform;
|
2010-09-09 20:40:15 +00:00
|
|
|
if (needsFramebuffer) {
|
2011-01-18 07:22:25 +00:00
|
|
|
LayerManagerOGL::InitMode mode = LayerManagerOGL::InitModeClear;
|
|
|
|
nsIntRect framebufferRect = visibleRect;
|
|
|
|
if (aContainer->GetEffectiveVisibleRegion().GetNumRects() == 1 &&
|
|
|
|
(aContainer->GetContentFlags() & Layer::CONTENT_OPAQUE))
|
|
|
|
{
|
|
|
|
// don't need a background, we're going to paint all opaque stuff
|
|
|
|
aContainer->mSupportsComponentAlphaChildren = PR_TRUE;
|
|
|
|
mode = LayerManagerOGL::InitModeNone;
|
|
|
|
} else {
|
|
|
|
const gfx3DMatrix& transform3D = aContainer->GetEffectiveTransform();
|
|
|
|
gfxMatrix transform;
|
|
|
|
// If we have an opaque ancestor layer, then we can be sure that
|
|
|
|
// all the pixels we draw into are either opaque already or will be
|
|
|
|
// covered by something opaque. Otherwise copying up the background is
|
|
|
|
// not safe.
|
|
|
|
if (HasOpaqueAncestorLayer(aContainer) &&
|
|
|
|
transform3D.Is2D(&transform) && !transform.HasNonIntegerTranslation()) {
|
|
|
|
mode = LayerManagerOGL::InitModeCopy;
|
|
|
|
framebufferRect.x += transform.x0;
|
|
|
|
framebufferRect.y += transform.y0;
|
|
|
|
aContainer->mSupportsComponentAlphaChildren = PR_TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-25 07:44:18 +00:00
|
|
|
aContainer->gl()->PushViewportRect();
|
2011-01-18 07:22:25 +00:00
|
|
|
framebufferRect -= childOffset;
|
|
|
|
aManager->CreateFBOWithTexture(framebufferRect,
|
|
|
|
mode,
|
2010-10-13 22:55:45 +00:00
|
|
|
&frameBuffer,
|
|
|
|
&containerSurface);
|
2010-05-31 23:29:37 +00:00
|
|
|
childOffset.x = visibleRect.x;
|
|
|
|
childOffset.y = visibleRect.y;
|
2010-04-01 21:17:15 +00:00
|
|
|
} else {
|
|
|
|
frameBuffer = aPreviousFrameBuffer;
|
2011-01-18 07:22:25 +00:00
|
|
|
aContainer->mSupportsComponentAlphaChildren = (aContainer->GetContentFlags() & Layer::CONTENT_OPAQUE) ||
|
|
|
|
(aContainer->GetParent() && aContainer->GetParent()->SupportsComponentAlphaChildren());
|
2010-11-30 06:02:46 +00:00
|
|
|
#ifdef DEBUG
|
|
|
|
PRBool is2d =
|
|
|
|
#endif
|
|
|
|
transform.Is2D(&contTransform);
|
|
|
|
NS_ASSERTION(is2d, "Transform must be 2D");
|
2010-04-01 21:17:15 +00:00
|
|
|
}
|
2010-05-25 06:35:35 +00:00
|
|
|
|
2010-03-30 04:48:52 +00:00
|
|
|
/**
|
|
|
|
* Render this container's contents.
|
|
|
|
*/
|
2010-11-30 05:51:56 +00:00
|
|
|
for (LayerOGL* layerToRender = aContainer->GetFirstChildOGL();
|
|
|
|
layerToRender != nsnull;
|
|
|
|
layerToRender = GetNextSibling(layerToRender)) {
|
|
|
|
|
|
|
|
if (layerToRender->GetLayer()->GetEffectiveVisibleRegion().IsEmpty()) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2011-02-25 07:44:22 +00:00
|
|
|
nsIntRect scissorRect =
|
|
|
|
layerToRender->GetLayer()->CalculateScissorRect(needsFramebuffer,
|
|
|
|
visibleRect,
|
|
|
|
cachedScissor,
|
2011-05-14 00:11:37 +00:00
|
|
|
contTransform * worldTransform);
|
2010-09-21 19:41:24 +00:00
|
|
|
|
2011-02-25 07:44:22 +00:00
|
|
|
if (scissorRect.IsEmpty()) {
|
|
|
|
continue;
|
2010-09-21 19:41:24 +00:00
|
|
|
}
|
|
|
|
|
2011-02-25 07:44:22 +00:00
|
|
|
aContainer->gl()->fScissor(scissorRect.x,
|
|
|
|
scissorRect.y,
|
|
|
|
scissorRect.width,
|
|
|
|
scissorRect.height);
|
2010-09-21 19:41:24 +00:00
|
|
|
|
2010-11-08 09:06:15 +00:00
|
|
|
layerToRender->RenderLayer(frameBuffer, childOffset);
|
2011-02-17 03:56:06 +00:00
|
|
|
aContainer->gl()->MakeCurrent();
|
2010-03-30 04:48:52 +00:00
|
|
|
}
|
|
|
|
|
2010-09-09 20:40:15 +00:00
|
|
|
|
|
|
|
if (needsFramebuffer) {
|
2010-04-01 21:17:15 +00:00
|
|
|
// Unbind the current framebuffer and rebind the previous one.
|
2010-09-29 18:36:32 +00:00
|
|
|
|
|
|
|
// Restore the viewport
|
2010-10-13 22:55:45 +00:00
|
|
|
aContainer->gl()->PopViewportRect();
|
|
|
|
nsIntRect viewport = aContainer->gl()->ViewportRect();
|
2011-02-04 19:47:06 +00:00
|
|
|
aManager->SetupPipeline(viewport.width, viewport.height,
|
|
|
|
LayerManagerOGL::ApplyWorldTransform);
|
2011-02-25 07:44:18 +00:00
|
|
|
aContainer->gl()->PopScissorRect();
|
2010-09-29 18:36:32 +00:00
|
|
|
|
2010-10-13 22:55:45 +00:00
|
|
|
aContainer->gl()->fBindFramebuffer(LOCAL_GL_FRAMEBUFFER, aPreviousFrameBuffer);
|
|
|
|
aContainer->gl()->fDeleteFramebuffers(1, &frameBuffer);
|
2010-04-01 21:17:15 +00:00
|
|
|
|
2010-10-13 22:55:45 +00:00
|
|
|
aContainer->gl()->fActiveTexture(LOCAL_GL_TEXTURE0);
|
2010-04-01 21:17:15 +00:00
|
|
|
|
2010-10-13 22:55:45 +00:00
|
|
|
aContainer->gl()->fBindTexture(aManager->FBOTextureTarget(), containerSurface);
|
2010-05-13 00:56:11 +00:00
|
|
|
|
2010-10-13 22:55:45 +00:00
|
|
|
ColorTextureLayerProgram *rgb = aManager->GetFBOLayerProgram();
|
2010-04-01 21:17:15 +00:00
|
|
|
|
2010-05-25 06:35:35 +00:00
|
|
|
rgb->Activate();
|
2010-05-31 23:29:37 +00:00
|
|
|
rgb->SetLayerQuadRect(visibleRect);
|
2010-10-13 22:55:45 +00:00
|
|
|
rgb->SetLayerTransform(transform);
|
2010-05-25 06:35:35 +00:00
|
|
|
rgb->SetLayerOpacity(opacity);
|
|
|
|
rgb->SetRenderOffset(aOffset);
|
|
|
|
rgb->SetTextureUnit(0);
|
2010-04-01 21:17:15 +00:00
|
|
|
|
2010-05-25 06:35:35 +00:00
|
|
|
if (rgb->GetTexCoordMultiplierUniformLocation() != -1) {
|
|
|
|
// 2DRect case, get the multiplier right for a sampler2DRect
|
2010-05-31 23:29:37 +00:00
|
|
|
float f[] = { float(visibleRect.width), float(visibleRect.height) };
|
2010-05-25 06:35:35 +00:00
|
|
|
rgb->SetUniform(rgb->GetTexCoordMultiplierUniformLocation(),
|
|
|
|
2, f);
|
|
|
|
}
|
2010-04-01 21:17:15 +00:00
|
|
|
|
2011-02-25 07:44:18 +00:00
|
|
|
// Drawing is always flipped, but when copying between surfaces we want to avoid
|
|
|
|
// this. Pass true for the flip parameter to introduce a second flip
|
|
|
|
// that cancels the other one out.
|
|
|
|
aManager->BindAndDrawQuad(rgb, true);
|
2010-04-01 21:17:15 +00:00
|
|
|
|
2010-05-25 06:35:35 +00:00
|
|
|
// Clean up resources. This also unbinds the texture.
|
2010-10-13 22:55:45 +00:00
|
|
|
aContainer->gl()->fDeleteTextures(1, &containerSurface);
|
2011-02-25 07:44:18 +00:00
|
|
|
} else {
|
|
|
|
aContainer->gl()->PopScissorRect();
|
2010-10-13 22:55:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ContainerLayerOGL::ContainerLayerOGL(LayerManagerOGL *aManager)
|
|
|
|
: ContainerLayer(aManager, NULL)
|
|
|
|
, LayerOGL(aManager)
|
|
|
|
{
|
|
|
|
mImplData = static_cast<LayerOGL*>(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
ContainerLayerOGL::~ContainerLayerOGL()
|
|
|
|
{
|
|
|
|
Destroy();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ContainerLayerOGL::InsertAfter(Layer* aChild, Layer* aAfter)
|
|
|
|
{
|
|
|
|
ContainerInsertAfter(this, aChild, aAfter);
|
|
|
|
}
|
2010-05-25 06:35:35 +00:00
|
|
|
|
2010-10-13 22:55:45 +00:00
|
|
|
void
|
|
|
|
ContainerLayerOGL::RemoveChild(Layer *aChild)
|
|
|
|
{
|
|
|
|
ContainerRemoveChild(this, aChild);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ContainerLayerOGL::Destroy()
|
|
|
|
{
|
|
|
|
ContainerDestroy(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
LayerOGL*
|
|
|
|
ContainerLayerOGL::GetFirstChildOGL()
|
|
|
|
{
|
|
|
|
if (!mFirstChild) {
|
|
|
|
return nsnull;
|
2010-04-01 21:17:15 +00:00
|
|
|
}
|
2010-10-13 22:55:45 +00:00
|
|
|
return static_cast<LayerOGL*>(mFirstChild->ImplData());
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ContainerLayerOGL::RenderLayer(int aPreviousFrameBuffer,
|
2010-11-08 09:06:15 +00:00
|
|
|
const nsIntPoint& aOffset)
|
2010-10-13 22:55:45 +00:00
|
|
|
{
|
2010-11-08 09:06:15 +00:00
|
|
|
ContainerRender(this, aPreviousFrameBuffer, aOffset, mOGLManager);
|
2010-10-13 22:55:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ShadowContainerLayerOGL::ShadowContainerLayerOGL(LayerManagerOGL *aManager)
|
|
|
|
: ShadowContainerLayer(aManager, NULL)
|
|
|
|
, LayerOGL(aManager)
|
|
|
|
{
|
|
|
|
mImplData = static_cast<LayerOGL*>(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
ShadowContainerLayerOGL::~ShadowContainerLayerOGL()
|
|
|
|
{
|
|
|
|
Destroy();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ShadowContainerLayerOGL::InsertAfter(Layer* aChild, Layer* aAfter)
|
|
|
|
{
|
|
|
|
ContainerInsertAfter(this, aChild, aAfter);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ShadowContainerLayerOGL::RemoveChild(Layer *aChild)
|
|
|
|
{
|
|
|
|
ContainerRemoveChild(this, aChild);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ShadowContainerLayerOGL::Destroy()
|
|
|
|
{
|
|
|
|
ContainerDestroy(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
LayerOGL*
|
|
|
|
ShadowContainerLayerOGL::GetFirstChildOGL()
|
|
|
|
{
|
|
|
|
if (!mFirstChild) {
|
|
|
|
return nsnull;
|
|
|
|
}
|
|
|
|
return static_cast<LayerOGL*>(mFirstChild->ImplData());
|
2010-03-30 04:48:52 +00:00
|
|
|
}
|
2010-10-13 22:55:45 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
ShadowContainerLayerOGL::RenderLayer(int aPreviousFrameBuffer,
|
2010-11-08 09:06:15 +00:00
|
|
|
const nsIntPoint& aOffset)
|
2010-10-13 22:55:45 +00:00
|
|
|
{
|
2010-11-08 09:06:15 +00:00
|
|
|
ContainerRender(this, aPreviousFrameBuffer, aOffset, mOGLManager);
|
2010-10-13 22:55:45 +00:00
|
|
|
}
|
|
|
|
|
2010-03-30 04:48:52 +00:00
|
|
|
|
|
|
|
} /* layers */
|
|
|
|
} /* mozilla */
|