mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-12-21 06:10:09 +00:00
commit
09a64e6368
@ -119,9 +119,11 @@ void RsRenderServiceUtil::DrawBuffer(SkCanvas* canvas, sptr<OHOS::SurfaceBuffer>
|
||||
std::make_unique<SkRect>(SkRect::MakeXYWH(0, 0, buffer->GetWidth(), buffer->GetHeight()));
|
||||
if (isDrawnOnDisplay) {
|
||||
const RSProperties& property = node.GetRenderProperties();
|
||||
auto geotry = std::static_pointer_cast<RSObjAbsGeometry>(property.GetBoundsGeometry());
|
||||
if (geotry) {
|
||||
canvas->setMatrix(geotry->GetAbsMatrix());
|
||||
auto geoptr = std::static_pointer_cast<RSObjAbsGeometry>(property.GetBoundsGeometry());
|
||||
if (geoptr) {
|
||||
canvas->setMatrix(geoptr->GetAbsMatrix());
|
||||
canvas->scale(static_cast<double>(geoptr->GetAbsRect().width_)/static_cast<double>(buffer->GetWidth()),
|
||||
static_cast<double>(geoptr->GetAbsRect().height_)/static_cast<double>(buffer->GetHeight()));
|
||||
}
|
||||
DealAnimation(canvas, paint, property, node.GetAnimationManager().GetTransitionProperties());
|
||||
auto filter = std::static_pointer_cast<RSSkiaFilter>(property.GetBackgroundFilter());
|
||||
|
@ -148,7 +148,6 @@ void RSSurfaceCaptureTask::RSSurfaceCaptureVisitor::ProcessSurfaceRenderNode(RSS
|
||||
ROSEN_LOGD("RSSurfaceCaptureTask::RSSurfaceCaptureVisitor::ProcessSurfaceRenderNode: node Buffer is nullptr!");
|
||||
return;
|
||||
}
|
||||
RsRenderServiceUtil::DrawBuffer(canvas_.get(), node.GetBuffer(), node, isDisplayNode_);
|
||||
for (auto child : node.GetChildren()) {
|
||||
auto existingChild = child.lock();
|
||||
if (!existingChild) {
|
||||
@ -157,6 +156,7 @@ void RSSurfaceCaptureTask::RSSurfaceCaptureVisitor::ProcessSurfaceRenderNode(RSS
|
||||
}
|
||||
existingChild->Process(shared_from_this());
|
||||
}
|
||||
RsRenderServiceUtil::DrawBuffer(canvas_.get(), node.GetBuffer(), node, isDisplayNode_);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user