Public Member Functions | Protected Member Functions | Protected Attributes

mozilla::layers::ContainerLayer Class Reference

A Layer which other layers render into. More...

#include <Layers.h>

Inheritance diagram for mozilla::layers::ContainerLayer:
Collaboration diagram for mozilla::layers::ContainerLayer:

List of all members.

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 LayerGetFirstChild ()
virtual LayerGetLastChild ()
const FrameMetricsGetFrameMetrics ()
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 nsACStringPrintInfo (nsACString &aTo, const char *aPrefix)

Protected Attributes

LayermFirstChild
LayermLastChild
FrameMetrics mFrameMetrics
PRPackedBool mUseIntermediateSurface
PRPackedBool mSupportsComponentAlphaChildren

Detailed Description

A Layer which other layers render into.

It holds references to its children.


Constructor & Destructor Documentation

mozilla::layers::ContainerLayer::ContainerLayer ( LayerManager aManager,
void *  aImplData 
) [inline, protected]

Member Function Documentation

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]
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]
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().


Member Data Documentation


The documentation for this class was generated from the following file: