Home | History | Annotate | Download | only in surfaceflinger

Lines Matching refs:Layer

43 #include "Layer.h"
57 int32_t Layer::sSequence = 1;
59 Layer::Layer(SurfaceFlinger* flinger, const sp<Client>& client,
125 void Layer::onFirstRef() {
147 Layer::~Layer() {
160 void Layer::onLayerDisplayed(const sp<const DisplayDevice>& /* hw */,
161 HWComposer::HWCLayerInterface* layer) {
162 if (layer) {
163 layer->onDisplayed();
164 mSurfaceFlingerConsumer->setReleaseFence(layer->getAndResetReleaseFence());
168 void Layer::onFrameAvailable(const BufferItem& item) {
199 void Layer::onFrameReplaced(const BufferItem& item) {
222 void Layer::onSidebandStreamChanged() {
230 // the layer has been remove from the current state list (and just before
232 void Layer::onRemoved() {
240 const String8& Layer::getName() const {
244 status_t Layer::setBuffers( uint32_t w, uint32_t h,
270 sp<IBinder> Layer::getHandle() {
274 "Layer::getHandle() has already been called");
279 * The layer handle is just a BBinder object passed to the client
284 * this layer when the handle is destroyed.
288 wp<const Layer> mOwner;
290 Handle(const sp<SurfaceFlinger>& flinger, const sp<Layer>& layer)
291 : LayerCleaner(flinger, layer), mOwner(layer) {
298 sp<IGraphicBufferProducer> Layer::getProducer() const {
306 Rect Layer::getContentCrop() const {
333 Rect Layer::computeBounds() const {
334 const Layer::State& s(getDrawingState());
338 Rect Layer::computeBounds(const Region& activeTransparentRegion) const {
339 const Layer::State& s(getDrawingState());
348 FloatRect Layer::computeCrop(const sp<const DisplayDevice>& hw) const {
350 // layer's size.
358 // layerstack space, and convert-back to layer space.
448 void Layer::setGeometry(
450 HWComposer::HWCLayerInterface& layer)
452 layer.setDefaultState();
454 // enable this layer
455 layer.setSkip(false);
458 layer.setSkip(true);
464 layer.setBlending(mPremultipliedAlpha ?
469 // apply the layer
470 // here we're guaranteed that the layer's transform preserves rects
496 layer.setFrame(tr.transform(frame));
497 layer.setCrop(computeCrop(hw));
498 layer.setPlaneAlpha(s.alpha);
504 * 3) layer orientation (screen orientation)
538 layer.setSkip(true);
540 layer.setTransform(orientation);
544 void Layer::setPerFrameData(const sp<const DisplayDevice>& hw,
545 HWComposer::HWCLayerInterface& layer) {
553 layer.setVisibleRegionScreen(visible);
554 layer.setSurfaceDamage(surfaceDamageRegion);
557 layer.setSidebandStream(mSidebandStream);
560 // layer yet, or if we ran out of memory
561 layer.setBuffer(mActiveBuffer);
565 void Layer::setAcquireFence(const sp<const DisplayDevice>& /* hw */,
566 HWComposer::HWCLayerInterface& layer) {
572 if (layer.getCompositionType() == HWC_OVERLAY || layer.getCompositionType() == HWC_CURSOR_OVERLAY) {
577 ALOGW("failed to dup layer fence, skipping sync: %d", errno);
581 layer.setAcquireFenceFd(fenceFd);
584 Rect Layer::getPosition(
590 // apply the layer's transform, followed by the display's global transform
591 // here we're guaranteed that the layer's transform preserves rects
608 void Layer::draw(const sp<const DisplayDevice>& hw, const Region& clip) const {
612 void Layer::draw(const sp<const DisplayDevice>& hw,
617 void Layer::draw(const sp<const DisplayDevice>& hw) const {
621 void Layer::onDraw(const sp<const DisplayDevice>& hw, const Region& clip,
627 // the texture has not been created yet, this Layer has
641 const sp<Layer>& layer(drawingLayers[i]);
642 if (layer.get() == static_cast<Layer const*>(this))
644 under.orSelf( hw->getTransform().transform(layer->visibleRegion) );
718 void Layer::clearWithOpenGL(const sp<const DisplayDevice>& hw,
728 void Layer::clearWithOpenGL(
733 void Layer::drawWithOpenGL(const sp<const DisplayDevice>& hw,
774 uint32_t Layer::getProducerStickyTransform() const {
785 void Layer::setFiltering(bool filtering) {
789 bool Layer::getFiltering() const {
800 bool Layer::getOpacityForFormat(uint32_t format) {
817 void Layer::computeGeometry(const sp<const DisplayDevice>& hw, Mesh& mesh,
820 const Layer::State& s(getDrawingState());
841 bool Layer::isOpaque(const Layer::State& s) const
844 // layer's opaque flag.
849 // if the layer has the opaque flag, then we're always opaque,
854 bool Layer::isSecure() const
856 const Layer::State& s(mDrawingState);
860 bool Layer::isProtected() const
867 bool Layer::isFixedSize() const {
871 bool Layer::isCropped() const {
875 bool Layer::needsFiltering(const sp<const DisplayDevice>& hw) const {
879 void Layer::setVisibleRegion(const Region& visibleRegion) {
884 void Layer::setCoveredRegion(const Region& coveredRegion) {
889 void Layer::setVisibleNonTransparentRegion(const Region&
899 uint32_t Layer::doTransaction(uint32_t flags) {
902 const Layer::State& s(getDrawingState());
903 const Layer::State& c(getCurrentState());
911 "doTransaction: geometry (layer=%p '%s'), tr=%02x, scalingMode=%d\n"
958 // don't let Layer::doTransaction update the drawing state
976 // this is used by Layer, which special cases resizes.
979 Layer::State& editCurrentState(getCurrentState());
985 flags |= Layer::eVisibleRegion;
1004 void Layer::commitTransaction() {
1008 uint32_t Layer::getTransactionFlags(uint32_t flags) {
1012 uint32_t Layer::setTransactionFlags(uint32_t flags) {
1016 bool Layer::setPosition(float x, float y) {
1024 bool Layer::setLayer(uint32_t z) {
1032 bool Layer::setSize(uint32_t w, uint32_t h) {
1040 bool Layer::setAlpha(uint8_t alpha) {
1048 bool Layer::setMatrix(const layer_state_t::matrix22_t& matrix) {
1055 bool Layer::setTransparentRegionHint(const Region& transparent) {
1060 bool Layer::setFlags(uint8_t flags, uint8_t mask) {
1069 bool Layer::setCrop(const Rect& crop) {
1078 bool Layer::setLayerStack(uint32_t layerStack) {
1087 void Layer::useSurfaceDamage() {
1095 void Layer::useEmptyDamage() {
1103 bool Layer::shouldPresentNow(const DispSync& dispSync) const {
1126 bool Layer::onPreComposition() {
1131 void Layer::onPostComposition() {
1161 bool Layer::isVisible() const {
1162 const Layer::State& s(mDrawingState);
1167 Region Layer::latchBuffer(bool& recomputeVisibleRegions)
1188 // a composition step, we have to skip this layer at this point
1196 // Capture the old state of the layer for comparisons later
1202 Layer::State& front;
1203 Layer::State& current;
1206 Reject(Layer::State& front, Layer::State& current,
1320 // layer update so we check again at the next opportunity.
1429 uint32_t Layer::getEffectiveUsage(uint32_t usage) const
1443 void Layer::updateTransformHint(const sp<const DisplayDevice>& hw) const {
1462 void Layer::dump(String8& result, Colorizer& colorizer) const
1464 const Layer::State& s(getDrawingState());
1511 void Layer::dumpFrameStats(String8& result) const {
1515 void Layer::clearFrameStats() {
1519 void Layer::logFrameStats() {
1523 void Layer::getFrameStats(FrameStats* outStats) const {
1529 Layer::LayerCleaner::LayerCleaner(const sp<SurfaceFlinger>& flinger,
1530 const sp<Layer>& layer)
1531 : mFlinger(flinger), mLayer(layer) {
1534 Layer::LayerCleaner::~LayerCleaner() {