Home | History | Annotate | Download | only in surfaceflinger

Lines Matching defs:Layer

41 #include "Layer.h"
55 int32_t Layer::sSequence = 1;
57 Layer::Layer(SurfaceFlinger* flinger, const sp<Client>& client,
115 void Layer::onFirstRef() {
134 Layer::~Layer() {
147 void Layer::onLayerDisplayed(const sp<const DisplayDevice>& hw,
148 HWComposer::HWCLayerInterface* layer) {
149 if (layer) {
150 layer->onDisplayed();
151 mSurfaceFlingerConsumer->setReleaseFence(layer->getAndResetReleaseFence());
155 void Layer::onFrameAvailable() {
161 // the layer has been remove from the current state list (and just before
163 void Layer::onRemoved() {
171 const String8& Layer::getName() const {
175 status_t Layer::setBuffers( uint32_t w, uint32_t h,
202 sp<IBinder> Layer::getHandle() {
206 "Layer::getHandle() has already been called");
211 * The layer handle is just a BBinder object passed to the client
216 * this layer when the handle is destroyed.
220 wp<const Layer> mOwner;
222 Handle(const sp<SurfaceFlinger>& flinger, const sp<Layer>& layer)
223 : LayerCleaner(flinger, layer), mOwner(layer) {
230 sp<IGraphicBufferProducer> Layer::getBufferQueue() const {
238 Rect Layer::getContentCrop() const {
265 Rect Layer::computeBounds() const {
266 const Layer::State& s(getDrawingState());
275 FloatRect Layer::computeCrop(const sp<const DisplayDevice>& hw) const {
277 // layer's size.
285 // layerstack space, and convert-back to layer space.
340 void Layer::setGeometry(
342 HWComposer::HWCLayerInterface& layer)
344 layer.setDefaultState();
346 // enable this layer
347 layer.setSkip(false);
350 layer.setSkip(true);
356 layer.setBlending(mPremultipliedAlpha ?
361 // apply the layer's transform, followed by the display's global transform
362 // here we're guaranteed that the layer's transform preserves rects
366 layer.setFrame(tr.transform(frame));
367 layer.setCrop(computeCrop(hw));
368 layer.setPlaneAlpha(s.alpha);
374 * 3) layer orientation (screen orientation)
399 layer.setSkip(true);
401 layer.setTransform(orientation);
405 void Layer::setPerFrameData(const sp<const DisplayDevice>& hw,
406 HWComposer::HWCLayerInterface& layer) {
414 layer.setVisibleRegionScreen(visible);
417 // layer yet, or if we ran out of memory
418 layer.setBuffer(mActiveBuffer);
421 void Layer::setAcquireFence(const sp<const DisplayDevice>& hw,
422 HWComposer::HWCLayerInterface& layer) {
428 if (layer.getCompositionType() == HWC_OVERLAY) {
433 ALOGW("failed to dup layer fence, skipping sync: %d", errno);
437 layer.setAcquireFenceFd(fenceFd);
444 void Layer::draw(const sp<const DisplayDevice>& hw, const Region& clip) const {
448 void Layer::draw(const sp<const DisplayDevice>& hw) {
452 void Layer::onDraw(const sp<const DisplayDevice>& hw, const Region& clip) const
457 // the texture has not been created yet, this Layer has
471 const sp<Layer>& layer(drawingLayers[i]);
472 if (layer.get() == static_cast<Layer const*>(this))
474 under.orSelf( hw->getTransform().transform(layer->visibleRegion) );
548 void Layer::clearWithOpenGL(const sp<const DisplayDevice>& hw, const Region& clip,
557 void Layer::clearWithOpenGL(
562 void Layer::drawWithOpenGL(
604 void Layer::setFiltering(bool filtering) {
608 bool Layer::getFiltering() const {
619 bool Layer::getOpacityForFormat(uint32_t format) {
637 void Layer::computeGeometry(const sp<const DisplayDevice>& hw, Mesh& mesh) const
639 const Layer::State& s(getDrawingState());
659 bool Layer::isOpaque() const
662 // layer's opaque flag.
667 // if the layer has the opaque flag, then we're always opaque,
672 bool Layer::isProtected() const
679 bool Layer::isFixedSize() const {
683 bool Layer::isCropped() const {
687 bool Layer::needsFiltering(const sp<const DisplayDevice>& hw) const {
691 void Layer::setVisibleRegion(const Region& visibleRegion) {
696 void Layer::setCoveredRegion(const Region& coveredRegion) {
701 void Layer::setVisibleNonTransparentRegion(const Region&
711 uint32_t Layer::doTransaction(uint32_t flags) {
714 const Layer::State& s(getDrawingState());
715 const Layer::State& c(getCurrentState());
723 "doTransaction: geometry (layer=%p '%s'), tr=%02x, scalingMode=%d\n"
770 // don't let Layer::doTransaction update the drawing state
784 // this is used by Layer, which special cases resizes.
787 Layer::State& editCurrentState(getCurrentState());
793 flags |= Layer::eVisibleRegion;
812 void Layer::commitTransaction() {
816 uint32_t Layer::getTransactionFlags(uint32_t flags) {
820 uint32_t Layer::setTransactionFlags(uint32_t flags) {
824 bool Layer::setPosition(float x, float y) {
832 bool Layer::setLayer(uint32_t z) {
840 bool Layer::setSize(uint32_t w, uint32_t h) {
848 bool Layer::setAlpha(uint8_t alpha) {
856 bool Layer::setMatrix(const layer_state_t::matrix22_t& matrix) {
863 bool Layer::setTransparentRegionHint(const Region& transparent) {
868 bool Layer::setFlags(uint8_t flags, uint8_t mask) {
877 bool Layer::setCrop(const Rect& crop) {
886 bool Layer::setLayerStack(uint32_t layerStack) {
899 bool Layer::onPreComposition() {
904 void Layer::onPostComposition() {
934 bool Layer::isVisible() const {
935 const Layer
940 Region Layer::latchBuffer(bool& recomputeVisibleRegions)
948 // a composition step, we have to skip this layer at this point
956 // Capture the old state of the layer for comparisons later
961 Layer::State& front;
962 Layer::State& current;
964 Reject(Layer::State& front, Layer::State& current,
1070 // layer update so we check again at the next opportunity.
1130 const Layer::State& s(getDrawingState());
1139 uint32_t Layer::getEffectiveUsage(uint32_t usage) const
1150 void Layer::updateTransformHint(const sp<const DisplayDevice>& hw) const {
1169 void Layer::dump(String8& result, Colorizer& colorizer) const
1171 const Layer::State& s(getDrawingState());
1217 void Layer::dumpStats(String8& result) const {
1221 void Layer::clearStats() {
1225 void Layer::logFrameStats() {
1231 Layer::LayerCleaner::LayerCleaner(const sp<SurfaceFlinger>& flinger,
1232 const sp<Layer>& layer)
1233 : mFlinger(flinger), mLayer(layer) {
1236 Layer::LayerCleaner::~LayerCleaner() {