forked from flutter/flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9359311
commit 3f41788
Showing
15 changed files
with
125 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "impeller/aiks/aiks_renderer.h" | ||
|
||
#include "impeller/aiks/picture.h" | ||
|
||
namespace impeller { | ||
|
||
AiksRenderer::AiksRenderer(std::shared_ptr<Context> context) | ||
: context_(std::move(context)) { | ||
if (!context_ || !context_->IsValid()) { | ||
return; | ||
} | ||
|
||
content_renderer_ = std::make_unique<ContentRenderer>(context_); | ||
if (!content_renderer_->IsValid()) { | ||
return; | ||
} | ||
|
||
is_valid_ = true; | ||
} | ||
|
||
AiksRenderer::~AiksRenderer() = default; | ||
|
||
bool AiksRenderer::IsValid() const { | ||
return is_valid_; | ||
} | ||
|
||
bool AiksRenderer::Render(const Picture& picture, RenderPass& parent_pass) { | ||
if (!IsValid()) { | ||
return false; | ||
} | ||
|
||
for (const auto& entry : picture.entries) { | ||
if (!entry.pass.has_value()) { | ||
continue; | ||
; | ||
} | ||
|
||
if (!entry.pass->Render(*content_renderer_, parent_pass)) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
} // namespace impeller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.