Home
last modified time | relevance | path

Searched refs:layer (Results 1 – 25 of 260) sorted by relevance

1234567891011

/frameworks/native/services/surfaceflinger/FrontEnd/
DLayerLifecycleManager.cpp46 RequestedLayerState& layer = *newLayer.get(); in addLayers() local
47 auto [it, inserted] = mIdToLayer.try_emplace(layer.id, References{.owner = layer}); in addLayers()
50 layer.getDebugString().c_str(), in addLayers()
55 layer.parentId = linkLayer(layer.parentId, layer.id); in addLayers()
56 layer.relativeParentId = linkLayer(layer.relativeParentId, layer.id); in addLayers()
57 if (layer.layerStackToMirror != ui::INVALID_LAYER_STACK) { in addLayers()
60 layer.layerStack = ui::INVALID_LAYER_STACK; in addLayers()
64 mDisplayMirroringLayers.emplace_back(layer.id); in addLayers()
66 if (canMirrorRootLayer(layer, *rootLayer)) { in addLayers()
67 layer.mirrorIds.emplace_back(rootLayer->id); in addLayers()
[all …]
DLayerHierarchy.cpp48 LayerHierarchy::LayerHierarchy(RequestedLayerState* layer) : mLayer(layer) {} in LayerHierarchy() argument
178 for (auto& layer : layers) { in LayerHierarchyBuilder() local
179 mHierarchies.emplace_back(std::make_unique<LayerHierarchy>(layer.get())); in LayerHierarchyBuilder()
180 mLayerIdToHierarchy[layer->id] = mHierarchies.back().get(); in LayerHierarchyBuilder()
182 for (const auto& layer : layers) { in LayerHierarchyBuilder() local
183 onLayerAdded(layer.get()); in LayerHierarchyBuilder()
189 auto layer = hierarchy->mLayer; in attachToParent() local
190 LayerHierarchy::Variant type = layer->hasValidRelativeParent() in attachToParent()
196 if (layer->parentId != UNASSIGNED_LAYER_ID) { in attachToParent()
197 parent = getHierarchyFromId(layer->parentId); in attachToParent()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DTransactionSurfaceFrameTest.cpp63 void commitTransaction(Layer* layer) { in commitTransaction() argument
64 auto c = layer->getDrawingState(); in commitTransaction()
65 layer->commitTransaction(c); in commitTransaction()
74 sp<Layer> layer = createLayer(); in PresentedSurfaceFrameForBufferlessTransaction() local
78 layer->setFrameTimelineVsyncForBufferlessTransaction(ftInfo, 10); in PresentedSurfaceFrameForBufferlessTransaction()
79 EXPECT_EQ(1u, layer->mDrawingState.bufferlessSurfaceFramesTX.size()); in PresentedSurfaceFrameForBufferlessTransaction()
80 ASSERT_TRUE(layer->mDrawingState.bufferSurfaceFrameTX == nullptr); in PresentedSurfaceFrameForBufferlessTransaction()
81 const auto surfaceFrame = layer->mDrawingState.bufferlessSurfaceFramesTX.at(/*token*/ 1); in PresentedSurfaceFrameForBufferlessTransaction()
82 commitTransaction(layer.get()); in PresentedSurfaceFrameForBufferlessTransaction()
89 sp<Layer> layer = createLayer(); in PresentedSurfaceFrameForBufferTransaction() local
[all …]
DLayerTest.cpp44 sp<Layer> layer = GetParam()->createLayer(mFlinger); in TEST_P() local
45 layer->updateGeometry(); in TEST_P()
46 layer->computeBounds(LARGE_FLOAT_RECT, ui::Transform(), 0.f); in TEST_P()
47 ASSERT_FALSE(layer->isHiddenByPolicy()); in TEST_P()
51 sp<Layer> layer = GetParam()->createLayer(mFlinger); in TEST_P() local
54 layer->setMatrix(matrix); in TEST_P()
55 layer->updateGeometry(); in TEST_P()
56 layer->computeBounds(LARGE_FLOAT_RECT, ui::Transform(), 0.f); in TEST_P()
58 ASSERT_TRUE(layer->isHiddenByPolicy()); in TEST_P()
62 sp<Layer> layer = GetParam()->createLayer(mFlinger); in TEST_P() local
[all …]
DLayerHistoryTest.cpp105 void setDefaultLayerVote(Layer* layer, in setDefaultLayerVote() argument
107 auto [found, layerPair] = history().findLayer(layer->getSequence()); in setDefaultLayerVote()
118 void recordFramesAndExpect(const sp<MockLayer>& layer, nsecs_t& time, Fps frameRate, in recordFramesAndExpect() argument
122 history().record(layer->getSequence(), layer->getLayerProps(), time, time, in recordFramesAndExpect()
151 const auto layer = createLayer(); in TEST_F() local
152 EXPECT_CALL(*layer, isVisible()).WillRepeatedly(Return(true)); in TEST_F()
153 EXPECT_CALL(*layer, getFrameRateForLayerTree()).WillRepeatedly(Return(Layer::FrameRate())); in TEST_F()
154 EXPECT_CALL(*layer, getDefaultFrameRateCompatibility()) in TEST_F()
166 history().record(layer->getSequence(), layer->getLayerProps(), 0, time, in TEST_F()
168 history().setDefaultFrameRateCompatibility(layer.get(), true /* contentDetectionEnabled */); in TEST_F()
[all …]
/frameworks/native/services/surfaceflinger/Tracing/
DTransactionProtoParser.cpp97 auto& layer = resolvedComposerState.state; in toProto() local
99 proto.set_what(layer.what); in toProto()
101 if (layer.what & layer_state_t::ePositionChanged) { in toProto()
102 proto.set_x(layer.x); in toProto()
103 proto.set_y(layer.y); in toProto()
105 if (layer.what & layer_state_t::eLayerChanged) { in toProto()
106 proto.set_z(layer.z); in toProto()
109 if (layer.what & layer_state_t::eLayerStackChanged) { in toProto()
110 proto.set_layer_stack(layer.layerStack.id); in toProto()
112 if (layer.what & layer_state_t::eFlagsChanged) { in toProto()
[all …]
/frameworks/native/services/surfaceflinger/tests/
DLayerRenderTypeTransaction_test.cpp55 sp<SurfaceControl> layer; in TEST_P() local
56 ASSERT_NO_FATAL_FAILURE(layer = createLayer("test", 32, 32)); in TEST_P()
57 ASSERT_NO_FATAL_FAILURE(fillBufferQueueLayerColor(layer, Color::RED, 32, 32)); in TEST_P()
67 Transaction().setPosition(layer, 5, 10).apply(); in TEST_P()
78 sp<SurfaceControl> layer; in TEST_P() local
79 ASSERT_NO_FATAL_FAILURE(layer = createLayer("test", 32, 32)); in TEST_P()
80 ASSERT_NO_FATAL_FAILURE(fillBufferQueueLayerColor(layer, Color::RED, 32, 32)); in TEST_P()
86 Transaction().setPosition(layer, 0.5f - epsilon, 0.5f - epsilon).apply(); in TEST_P()
92 Transaction().setPosition(layer, 0.5f + epsilon, 0.5f + epsilon).apply(); in TEST_P()
100 sp<SurfaceControl> layer; in TEST_P() local
[all …]
DLayerTransaction_test.cpp29 sp<SurfaceControl> layer; in TEST_F() local
31 layer = createLayer("test", 32, 32, ISurfaceComposerClient::eFXSurfaceBufferState)); in TEST_F()
33 Transaction().setTransformToDisplayInverse(layer, false).apply(); in TEST_F()
35 ASSERT_NO_FATAL_FAILURE(fillBufferLayerColor(layer, Color::GREEN, 32, 32)); in TEST_F()
37 Transaction().setTransformToDisplayInverse(layer, true).apply(); in TEST_F()
41 sp<SurfaceControl> layer; in TEST_F() local
43 layer = createLayer("test", 32, 32, ISurfaceComposerClient::eFXSurfaceBufferState)); in TEST_F()
46 Transaction().setSidebandStream(layer, nullptr).apply(); in TEST_F()
50 sp<SurfaceControl> layer; in TEST_F() local
51 ASSERT_NO_FATAL_FAILURE(layer = createLayer("test", 32, 32)); in TEST_F()
[all …]
DLayerCallback_test.cpp58 static int fillBuffer(Transaction& transaction, const sp<SurfaceControl>& layer, in fillBuffer() argument
68 transaction.setBuffer(layer, buffer, fence); in fillBuffer()
72 transaction.setBackgroundColor(layer, /*color*/ half3(1.0f, 0, 0), /*alpha*/ 1.0f, in fillBuffer()
80 const sp<SurfaceControl>& layer = nullptr, bool setBuffer = true, in fillTransaction() argument
82 if (layer) { in fillTransaction()
83 int err = fillBuffer(transaction, layer, setBuffer, setBackgroundColor); in fillTransaction()
166 sp<SurfaceControl> layer; in TEST_F() local
167 ASSERT_NO_FATAL_FAILURE(layer = createLayerWithBuffer()); in TEST_F()
171 int err = fillTransaction(transaction, &callback, layer, true, true); in TEST_F()
180 expected.addSurface(ExpectedResult::Transaction::PRESENTED, layer); in TEST_F()
[all …]
DReleaseBufferCallback_test.cpp84 static void submitBuffer(const sp<SurfaceControl>& layer, sp<GraphicBuffer> buffer, in submitBuffer() argument
88 t.setBuffer(layer, buffer, fence, id.framenumber, 0 /* producerId */, in submitBuffer()
126 sp<SurfaceControl> layer = createBufferStateLayer(); in TEST_F() local
133 submitBuffer(layer, firstBuffer, Fence::NO_FENCE, transactionCallback, firstBufferCallbackId, in TEST_F()
136 expected.addSurface(ExpectedResult::Transaction::PRESENTED, layer, in TEST_F()
153 submitBuffer(layer, secondBuffer, Fence::NO_FENCE, transactionCallback, secondBufferCallbackId, in TEST_F()
156 expected.addSurface(ExpectedResult::Transaction::PRESENTED, layer, in TEST_F()
164 sp<SurfaceControl> layer = createBufferStateLayer(); in TEST_F() local
172 submitBuffer(layer, firstBuffer, Fence::NO_FENCE, transactionCallback, firstBufferCallbackId, in TEST_F()
175 expected.addSurface(ExpectedResult::Transaction::PRESENTED, layer, in TEST_F()
[all …]
DLayerTransactionTest.h67 auto layer = variable
71 t.setLayerStack(layer, mDisplayLayerStack).setLayer(layer, mLayerZBase);
76 layer.clear();
79 return layer;
88 auto layer = client->createSurface(String8(name), width, height, format, flags, variable
90 EXPECT_NE(nullptr, layer.get()) << "failed to create SurfaceControl";
91 return layer;
113 ANativeWindow_Buffer getBufferQueueLayerBuffer(const sp<SurfaceControl>& layer) { in getBufferQueueLayerBuffer() argument
118 EXPECT_EQ(NO_ERROR, layer->getSurface()->lock(&buffer, nullptr)); in getBufferQueueLayerBuffer()
123 void postBufferQueueLayerBuffer(const sp<SurfaceControl>& layer) { in postBufferQueueLayerBuffer() argument
[all …]
/frameworks/native/services/surfaceflinger/layerproto/
Dlayers.proto25 // Similar to DEVICE, but the layer position may have been asynchronously set
32 // Information about each layer.
34 // unique id per layer.
36 // unique name per layer.
38 // list of children this layer may have. May be empty.
40 // list of layers that are z order relative to this layer.
42 // The type of layer, ex Color, Layer
48 // The layer's z order. Can be z order in layer stack, relative to parent,
49 // or relative to another layer specified in zOrderRelative.
51 // The layer's position on the display.
[all …]
DLayerProtoParser.cpp45 for (Layer& layer : layerTree.allLayers) { in generateLayerTree()
46 if (layer.parent == nullptr) { in generateLayerTree()
47 layerTree.topLevelLayers.push_back(&layer); in generateLayerTree()
78 Layer layer; in generateLayer() local
79 layer.id = layerProto.id(); in generateLayer()
80 layer.name = layerProto.name(); in generateLayer()
81 layer.type = layerProto.type(); in generateLayer()
82 layer.transparentRegion = generateRegion(layerProto.transparent_region()); in generateLayer()
83 layer.visibleRegion = generateRegion(layerProto.visible_region()); in generateLayer()
84 layer.damageRegion = generateRegion(layerProto.damage_region()); in generateLayer()
[all …]
/frameworks/base/libs/hwui/jni/
Dandroid_graphics_TextureLayer.cpp30 DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerUpdaterPtr); in TextureLayer_prepare() local
32 changed |= layer->setSize(width, height); in TextureLayer_prepare()
33 changed |= layer->setBlend(!isOpaque); in TextureLayer_prepare()
39 DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerUpdaterPtr); in TextureLayer_setLayerPaint() local
40 if (layer) { in TextureLayer_setLayerPaint()
42 layer->setPaint(paint); in TextureLayer_setLayerPaint()
48 DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerUpdaterPtr); in TextureLayer_setTransform() local
50 layer->setTransform(matrix); in TextureLayer_setTransform()
55 DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerUpdaterPtr); in TextureLayer_setSurfaceTexture() local
57 layer->setSurfaceTexture(AutoTextureRelease(surfaceTexture, &ASurfaceTexture_release)); in TextureLayer_setSurfaceTexture()
[all …]
/frameworks/native/opengl/tests/hwc/
DhwcColorEquiv.cpp353 hwc_layer_1_t *layer = &list->hwLayers[0]; in main() local
354 layer->handle = refFrame->handle; in main()
355 layer->blending = HWC_BLENDING_NONE; in main()
356 layer->sourceCrop.left = 0; in main()
357 layer->sourceCrop.top = 0; in main()
358 layer->sourceCrop.right = width; in main()
359 layer->sourceCrop.bottom = refHeight; in main()
360 layer->displayFrame.left = 0; in main()
361 layer->displayFrame.top = 0; in main()
362 layer->displayFrame.right = width; in main()
[all …]
DhwcStress.cpp431 hwc_layer_1_t *layer = &list->hwLayers[n1]; in main() local
432 layer->handle = gBuf->handle; in main()
434 layer->blending = blendingOps[testRandMod(NUMA(blendingOps))]; in main()
435 layer->flags = (testRandFract() > rareRatio) ? 0 in main()
438 layer->transform = (noTransform || testRandFract() > rareRatio) ? 0 in main()
441 layer->sourceCrop.left = testRandMod(gBuf->getWidth()); in main()
442 layer->sourceCrop.top = testRandMod(gBuf->getHeight()); in main()
443 layer->sourceCrop.right = layer->sourceCrop.left in main()
444 + testRandMod(gBuf->getWidth() - layer->sourceCrop.left) + 1; in main()
445 layer->sourceCrop.bottom = layer->sourceCrop.top in main()
[all …]
/frameworks/native/vulkan/libvulkan/
Dlayers_extensions.cpp98 void* GetGPA(const Layer& layer, const std::string_view gpa_name) const;
245 Layer layer; in EnumerateLayers() local
246 layer.properties = props; in EnumerateLayers()
247 layer.library_idx = library_idx; in EnumerateLayers()
248 layer.is_global = false; in EnumerateLayers()
261 layer.instance_extensions.resize(count); in EnumerateLayers()
263 props.layerName, &count, layer.instance_extensions.data()); in EnumerateLayers()
276 layer.is_global = true; in EnumerateLayers()
281 if (layer.is_global && enumerate_device_extensions) { in EnumerateLayers()
292 layer.device_extensions.resize(count); in EnumerateLayers()
[all …]
Dlayers_extensions.h29 explicit LayerRef(const Layer* layer);
52 const VkLayerProperties& GetLayerProperties(const Layer& layer);
53 bool IsLayerGlobal(const Layer& layer);
54 const VkExtensionProperties* GetLayerInstanceExtensions(const Layer& layer,
56 const VkExtensionProperties* GetLayerDeviceExtensions(const Layer& layer,
59 const VkExtensionProperties* FindLayerInstanceExtension(const Layer& layer,
61 const VkExtensionProperties* FindLayerDeviceExtension(const Layer& layer,
64 LayerRef GetLayerRef(const Layer& layer);
/frameworks/native/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/
DLayerState.h89 virtual ftl::Flags<LayerStateField> update(const compositionengine::OutputLayer* layer) = 0;
105 using ReadFromLayerState = std::function<T(const compositionengine::OutputLayer* layer)>;
157 ftl::Flags<LayerStateField> update(const compositionengine::OutputLayer* layer) override {
158 T newValue = mReader(layer);
217 LayerState(compositionengine::OutputLayer* layer);
278 [](const compositionengine::OutputLayer* layer) {
279 return layer->getLayerFE().getSequence();
283 mName{[](auto layer) { return layer->getLayerFE().getDebugName(); },
289 mDisplayFrame{[](auto layer) { return layer->getState().displayFrame; },
297 mSourceCrop{[](auto layer) { return layer->getState().sourceCrop; },
[all …]
/frameworks/native/services/surfaceflinger/CompositionEngine/src/planner/
DCachedSet.cpp62 CachedSet::CachedSet(const LayerState* layer, std::chrono::steady_clock::time_point lastUpdate) in CachedSet() argument
63 : mFingerprint(layer->getHash()), mLastUpdate(lastUpdate) { in CachedSet()
64 addLayer(layer, lastUpdate); in CachedSet()
67 CachedSet::CachedSet(Layer layer) in CachedSet() argument
68 : mFingerprint(layer.getHash()), in CachedSet()
69 mLastUpdate(layer.getLastUpdate()), in CachedSet()
70 mBounds(layer.getDisplayFrame()), in CachedSet()
71 mVisibleRegion(layer.getVisibleRegion()) { in CachedSet()
72 mLayers.emplace_back(std::move(layer)); in CachedSet()
75 void CachedSet::addLayer(const LayerState* layer, in addLayer() argument
[all …]
/frameworks/native/services/surfaceflinger/fuzzer/
Dsurfaceflinger_layer_fuzzer.cpp119 sp<Layer> layer = sp<Layer>::make(createLayerCreationArgs(&flinger, client)); in invokeBufferStateLayer() local
128 layer->onLayerDisplayed(ftl::yield<FenceResult>(fence).share(), in invokeBufferStateLayer()
130 layer->onLayerDisplayed(ftl::yield<FenceResult>( in invokeBufferStateLayer()
135 layer->releasePendingBuffer(mFdp.ConsumeIntegral<int64_t>()); in invokeBufferStateLayer()
136 layer->onPostComposition(nullptr, fenceTime, fenceTime, compositorTiming); in invokeBufferStateLayer()
138 layer->setTransform(mFdp.ConsumeIntegral<uint32_t>()); in invokeBufferStateLayer()
139 layer->setTransformToDisplayInverse(mFdp.ConsumeBool()); in invokeBufferStateLayer()
140 layer->setCrop(getFuzzedRect()); in invokeBufferStateLayer()
142 layer->setHdrMetadata(getFuzzedHdrMetadata(&mFdp)); in invokeBufferStateLayer()
143 layer->setDataspace(mFdp.PickValueInArray(kDataspaces)); in invokeBufferStateLayer()
[all …]
/frameworks/base/libs/hwui/pipeline/skia/
DLayerDrawable.cpp39 Layer* layer = mLayerUpdater->backingLayer(); in onDraw() local
40 if (layer) { in onDraw()
41 SkRect srcRect = layer->getCurrentCropRect(); in onDraw()
42 DrawLayer(canvas->recordingContext(), canvas, layer, &srcRect, nullptr, true); in onDraw()
109 Layer* layer, in DrawLayer() argument
119 const uint32_t windowTransform = layer->getWindowTransform(); in DrawLayer()
120 sk_sp<SkImage> layerImage = layer->getImage(); in DrawLayer()
121 const int layerWidth = layer->getWidth(); in DrawLayer()
122 const int layerHeight = layer->getHeight(); in DrawLayer()
130 canvas->concat(layer->getTransform()); in DrawLayer()
[all …]
/frameworks/av/media/libstagefright/renderfright/tests/
DRenderEngineTest.cpp383 static void fillColor(renderengine::LayerSettings& layer, half r, half g, half b, in fillColor()
385 layer.source.solidColor = half3(r, g, b); in fillColor()
390 static void setOpaqueBit(renderengine::LayerSettings& layer) { in setOpaqueBit()
391 layer.source.buffer.isOpaque = false; in setOpaqueBit()
398 static void setOpaqueBit(renderengine::LayerSettings& layer) { in setOpaqueBit()
399 layer.source.buffer.isOpaque = true; in setOpaqueBit()
411 static void fillColor(renderengine::LayerSettings& layer, half r, half g, half b, in fillColor()
435 layer.source.buffer.buffer = buf; in fillColor()
436 layer.source.buffer.textureName = texName; in fillColor()
437 OpaquenessVariant::setOpaqueBit(layer); in fillColor()
[all …]
/frameworks/native/libs/renderengine/skia/
DCache.cpp64 LayerSettings layer{ in drawShadowLayers() local
115 layer.geometry.positionTransform = transform; in drawShadowLayers()
118 auto layers = std::vector<LayerSettings>{layer, caster}; in drawShadowLayers()
129 LayerSettings layer{ in drawImageLayers() local
146 layer.sourceDataspace = dataspace; in drawImageLayers()
151 layer.geometry.roundedCornersRadius = {roundedCornersRadius, roundedCornersRadius}; in drawImageLayers()
153 layer.source.buffer.isOpaque = isOpaque; in drawImageLayers()
155 layer.alpha = alpha; in drawImageLayers()
156 auto layers = std::vector<LayerSettings>{layer}; in drawImageLayers()
169 LayerSettings layer{ in drawSolidLayers() local
[all …]
DSkiaRenderEngine.cpp211 static inline bool layerHasBlur(const android::renderengine::LayerSettings& layer, in layerHasBlur() argument
213 if (layer.backgroundBlurRadius > 0 || layer.blurRegions.size()) { in layerHasBlur()
215 const bool opaqueContent = !layer.source.buffer.buffer || layer.source.buffer.isOpaque; in layerHasBlur()
216 const bool opaqueAlpha = layer.alpha == 1.0f && !colorTransformModifiesAlpha; in layerHasBlur()
217 return layer.skipContentDraw || !(opaqueContent && opaqueAlpha); in layerHasBlur()
496 const auto& stretchEffect = parameters.layer.stretchEffect; in createRuntimeEffectShader()
499 const auto targetBuffer = parameters.layer.source.buffer.buffer; in createRuntimeEffectShader()
508 shaders::LinearEffect{.inputDataspace = parameters.layer.sourceDataspace, in createRuntimeEffectShader()
522 mat4 colorTransform = parameters.layer.colorTransform; in createRuntimeEffectShader()
528 const auto targetBuffer = parameters.layer.source.buffer.buffer; in createRuntimeEffectShader()
[all …]

1234567891011