Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion impeller/playground/playground.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ bool Playground::OpenPlaygroundHere(
ImGui_ImplGlfw_NewFrame();

auto surface = impl_->AcquireSurfaceFrame(context_);
RenderTarget render_target = surface->GetTargetRenderPassDescriptor();
RenderTarget render_target = surface->GetRenderTarget();

ImGui::NewFrame();
ImGui::DockSpaceOverViewport(ImGui::GetMainViewport(),
Expand Down
6 changes: 3 additions & 3 deletions impeller/renderer/backend/vulkan/test/swapchain_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TEST(SwapchainTest, CachesRenderPassOnSwapchainImage) {
std::vector<std::shared_ptr<Texture>> depth_stencil_textures;
for (auto i = 0u; i < 3u; i++) {
auto drawable = swapchain->AcquireNextDrawable();
RenderTarget render_target = drawable->GetTargetRenderPassDescriptor();
RenderTarget render_target = drawable->GetRenderTarget();

auto texture = render_target.GetRenderTargetTexture();
auto& texture_vk = TextureVK::Cast(*texture);
Expand Down Expand Up @@ -102,7 +102,7 @@ TEST(SwapchainTest, CachesRenderPassOnSwapchainImage) {
std::vector<SharedHandleVK<vk::RenderPass>> render_passes;
for (auto i = 0u; i < 3u; i++) {
auto drawable = swapchain->AcquireNextDrawable();
RenderTarget render_target = drawable->GetTargetRenderPassDescriptor();
RenderTarget render_target = drawable->GetRenderTarget();

auto texture = render_target.GetRenderTargetTexture();
auto& texture_vk = TextureVK::Cast(*texture);
Expand All @@ -117,7 +117,7 @@ TEST(SwapchainTest, CachesRenderPassOnSwapchainImage) {
// unchanged.
for (auto i = 0u; i < 3u; i++) {
auto drawable = swapchain->AcquireNextDrawable();
RenderTarget render_target = drawable->GetTargetRenderPassDescriptor();
RenderTarget render_target = drawable->GetRenderTarget();

auto texture = render_target.GetRenderTargetTexture();
auto& texture_vk = TextureVK::Cast(*texture);
Expand Down
2 changes: 1 addition & 1 deletion impeller/renderer/surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bool Surface::IsValid() const {
return is_valid_;
}

const RenderTarget& Surface::GetTargetRenderPassDescriptor() const {
const RenderTarget& Surface::GetRenderTarget() const {
return desc_;
}

Expand Down
2 changes: 1 addition & 1 deletion impeller/renderer/surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Surface {

bool IsValid() const;

const RenderTarget& GetTargetRenderPassDescriptor() const;
const RenderTarget& GetRenderTarget() const;

virtual bool Present() const;

Expand Down
2 changes: 1 addition & 1 deletion impeller/toolkit/interop/surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bool Surface::DrawDisplayList(const DisplayList& dl) const {

auto display_list = dl.GetDisplayList();
auto& content_context = context_->GetAiksContext().GetContentContext();
auto render_target = surface_->GetTargetRenderPassDescriptor();
auto render_target = surface_->GetRenderTarget();

const auto cull_rect = IRect::MakeSize(surface_->GetSize());
auto skia_cull_rect =
Expand Down
3 changes: 1 addition & 2 deletions shell/gpu/gpu_surface_gl_impeller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ std::unique_ptr<SurfaceFrame> GPUSurfaceGLImpeller::AcquireFrame(
impeller::ISize{size.width(), size.height()} // fbo_size
);

impeller::RenderTarget render_target =
surface->GetTargetRenderPassDescriptor();
impeller::RenderTarget render_target = surface->GetRenderTarget();

SurfaceFrame::EncodeCallback encode_calback =
[aiks_context = aiks_context_, //
Expand Down
26 changes: 12 additions & 14 deletions shell/gpu/gpu_surface_metal_impeller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,12 @@
surface->SetFrameBoundary(surface_frame.submit_info().frame_boundary);

const bool reset_host_buffer = surface_frame.submit_info().frame_boundary;
auto render_result =
impeller::RenderToOnscreen(aiks_context->GetContentContext(), //
surface->GetTargetRenderPassDescriptor(), //
display_list, //
sk_cull_rect, //
/*reset_host_buffer=*/reset_host_buffer //
);
auto render_result = impeller::RenderToOnscreen(aiks_context->GetContentContext(), //
surface->GetRenderTarget(), //
display_list, //
sk_cull_rect, //
/*reset_host_buffer=*/reset_host_buffer //
);
if (!render_result) {
return false;
}
Expand Down Expand Up @@ -282,13 +281,12 @@

impeller::IRect cull_rect = surface->coverage();
SkIRect sk_cull_rect = SkIRect::MakeWH(cull_rect.GetWidth(), cull_rect.GetHeight());
auto render_result =
impeller::RenderToOnscreen(aiks_context->GetContentContext(), //
surface->GetTargetRenderPassDescriptor(), //
display_list, //
sk_cull_rect, //
/*reset_host_buffer=*/true //
);
auto render_result = impeller::RenderToOnscreen(aiks_context->GetContentContext(), //
surface->GetRenderTarget(), //
display_list, //
sk_cull_rect, //
/*reset_host_buffer=*/true //
);
if (!render_result) {
FML_LOG(ERROR) << "Failed to render Impeller frame";
return false;
Expand Down
6 changes: 2 additions & 4 deletions shell/gpu/gpu_surface_vulkan_impeller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ std::unique_ptr<SurfaceFrame> GPUSurfaceVulkanImpeller::AcquireFrame(
return nullptr;
}

auto cull_rect =
surface->GetTargetRenderPassDescriptor().GetRenderTargetSize();
auto cull_rect = surface->GetRenderTarget().GetRenderTargetSize();

impeller::RenderTarget render_target =
surface->GetTargetRenderPassDescriptor();
impeller::RenderTarget render_target = surface->GetRenderTarget();

SurfaceFrame::EncodeCallback encode_callback = [aiks_context =
aiks_context_, //
Expand Down