A Layer which other layers render into. More...
#include <Layers.h>
Public Member Functions | |
virtual void | InsertAfter (Layer *aChild, Layer *aAfter)=0 |
CONSTRUCTION PHASE ONLY Insert aChild into the child list of this container. | |
virtual void | RemoveChild (Layer *aChild)=0 |
CONSTRUCTION PHASE ONLY Remove aChild from the child list of this container. | |
void | SetFrameMetrics (const FrameMetrics &aFrameMetrics) |
CONSTRUCTION PHASE ONLY Set the (sub)document metrics used to render the Layer subtree rooted at this. | |
virtual Layer * | GetFirstChild () |
virtual Layer * | GetLastChild () |
const FrameMetrics & | GetFrameMetrics () |
virtual const char * | Name () const |
virtual LayerType | GetType () const |
virtual void | ComputeEffectiveTransforms (const gfx3DMatrix &aTransformToSurface)=0 |
ContainerLayer backends need to override ComputeEffectiveTransforms since the decision about whether to use a temporary surface for the container is backend-specific. | |
PRBool | UseIntermediateSurface () |
Call this only after ComputeEffectiveTransforms has been invoked on this layer. | |
PRBool | HasMultipleChildren () |
Returns true if this container has more than one non-empty child. | |
PRBool | SupportsComponentAlphaChildren () |
Returns true if this container supports children with component alpha. | |
Protected Member Functions | |
ContainerLayer (LayerManager *aManager, void *aImplData) | |
void | DefaultComputeEffectiveTransforms (const gfx3DMatrix &aTransformToSurface) |
A default implementation of ComputeEffectiveTransforms for use by OpenGL and D3D. | |
void | ComputeEffectiveTransformsForChildren (const gfx3DMatrix &aTransformToSurface) |
Loops over the children calling ComputeEffectiveTransforms on them. | |
virtual nsACString & | PrintInfo (nsACString &aTo, const char *aPrefix) |
Protected Attributes | |
Layer * | mFirstChild |
Layer * | mLastChild |
FrameMetrics | mFrameMetrics |
PRPackedBool | mUseIntermediateSurface |
PRPackedBool | mSupportsComponentAlphaChildren |
A Layer which other layers render into.
It holds references to its children.
mozilla::layers::ContainerLayer::ContainerLayer | ( | LayerManager * | aManager, | |
void * | aImplData | |||
) | [inline, protected] |
virtual void mozilla::layers::ContainerLayer::ComputeEffectiveTransforms | ( | const gfx3DMatrix & | aTransformToSurface | ) | [pure virtual] |
ContainerLayer backends need to override ComputeEffectiveTransforms since the decision about whether to use a temporary surface for the container is backend-specific.
ComputeEffectiveTransforms must also set mUseIntermediateSurface.
Implements mozilla::layers::Layer.
void mozilla::layers::ContainerLayer::ComputeEffectiveTransformsForChildren | ( | const gfx3DMatrix & | aTransformToSurface | ) | [protected] |
Loops over the children calling ComputeEffectiveTransforms on them.
void mozilla::layers::ContainerLayer::DefaultComputeEffectiveTransforms | ( | const gfx3DMatrix & | aTransformToSurface | ) | [protected] |
A default implementation of ComputeEffectiveTransforms for use by OpenGL and D3D.
virtual Layer* mozilla::layers::ContainerLayer::GetFirstChild | ( | ) | [inline, virtual] |
Reimplemented from mozilla::layers::Layer.
const FrameMetrics& mozilla::layers::ContainerLayer::GetFrameMetrics | ( | ) | [inline] |
virtual Layer* mozilla::layers::ContainerLayer::GetLastChild | ( | ) | [inline, virtual] |
Reimplemented from mozilla::layers::Layer.
virtual LayerType mozilla::layers::ContainerLayer::GetType | ( | ) | const [inline, virtual] |
Implements mozilla::layers::Layer.
Reimplemented in mozilla::layers::ShadowContainerLayer.
PRBool mozilla::layers::ContainerLayer::HasMultipleChildren | ( | ) |
Returns true if this container has more than one non-empty child.
virtual void mozilla::layers::ContainerLayer::InsertAfter | ( | Layer * | aChild, | |
Layer * | aAfter | |||
) | [pure virtual] |
CONSTRUCTION PHASE ONLY Insert aChild into the child list of this container.
aChild must not be currently in any child list or the root for the layer manager. If aAfter is non-null, it must be a child of this container and we insert after that layer. If it's null we insert at the start.
virtual const char* mozilla::layers::ContainerLayer::Name | ( | ) | const [inline, virtual] |
Implements mozilla::layers::Layer.
Reimplemented in mozilla::layers::ShadowContainerLayer.
virtual nsACString& mozilla::layers::ContainerLayer::PrintInfo | ( | nsACString & | aTo, | |
const char * | aPrefix | |||
) | [protected, virtual] |
Reimplemented from mozilla::layers::Layer.
virtual void mozilla::layers::ContainerLayer::RemoveChild | ( | Layer * | aChild | ) | [pure virtual] |
CONSTRUCTION PHASE ONLY Remove aChild from the child list of this container.
aChild must be a child of this container.
void mozilla::layers::ContainerLayer::SetFrameMetrics | ( | const FrameMetrics & | aFrameMetrics | ) | [inline] |
CONSTRUCTION PHASE ONLY Set the (sub)document metrics used to render the Layer subtree rooted at this.
PRBool mozilla::layers::ContainerLayer::SupportsComponentAlphaChildren | ( | ) | [inline] |
Returns true if this container supports children with component alpha.
Should only be called while painting a child of this layer.
PRBool mozilla::layers::ContainerLayer::UseIntermediateSurface | ( | ) | [inline] |
Call this only after ComputeEffectiveTransforms has been invoked on this layer.
Returns true if this will use an intermediate surface. This is largely backend-dependent, but it affects the operation of GetEffectiveOpacity().
Layer* mozilla::layers::ContainerLayer::mFirstChild [protected] |
Layer* mozilla::layers::ContainerLayer::mLastChild [protected] |