Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 5, 2024
1 parent 82a1c18 commit 98832ea
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/mbgl/actor/actor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Actor {
template <class... Args>
Actor(Scheduler& scheduler, Args&&... args)
: target(scheduler, parent, std::forward<Args>(args)...) {}

template <class... Args>
Actor(const TaggedScheduler& scheduler, Args&&... args)
: retainer(scheduler.get()),
Expand Down
2 changes: 1 addition & 1 deletion include/mbgl/actor/established_actor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class EstablishedActor {
class... Args,
typename std::enable_if_t<std::is_constructible_v<U, Args...> ||
std::is_constructible_v<U, ActorRef<U>, Args...>>* = nullptr>
EstablishedActor(Scheduler& scheduler, AspiringActor<Object>& parent_, Args&&... args)
EstablishedActor(Scheduler& scheduler, AspiringActor<Object>& parent_, Args&&... args)
: parent(parent_) {
emplaceObject(std::forward<Args>(args)...);
parent.mailbox->open(scheduler);
Expand Down
3 changes: 2 additions & 1 deletion src/mbgl/gl/renderer_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ RendererBackend::RendererBackend(const gfx::ContextMode contextMode_)
: gfx::RendererBackend(contextMode_) {}

std::unique_ptr<gfx::Context> RendererBackend::createContext() {
auto result = std::make_unique<gl::Context>(*this); // Tagged background thread pool will be owned by the RendererBackend
auto result = std::make_unique<gl::Context>(
*this); // Tagged background thread pool will be owned by the RendererBackend
result->enableDebugging();
result->initializeExtensions(std::bind(&RendererBackend::getExtensionFunctionPointer, this, std::placeholders::_1));
return result;
Expand Down
2 changes: 1 addition & 1 deletion src/mbgl/mtl/renderer_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RendererBackend::~RendererBackend() = default;

std::unique_ptr<gfx::Context> RendererBackend::createContext() {
return std::make_unique<mtl::Context>(*this,
TaggedScheduler{Scheduler::GetBackground(), static_cast<const void*>(owner)});
TaggedScheduler{Scheduler::GetBackground(), static_cast<const void*>(owner)});
}

PremultipliedImage RendererBackend::readFramebuffer(const Size& size) {
Expand Down
4 changes: 3 additions & 1 deletion src/mbgl/renderer/render_orchestrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ class RenderTreeImpl final : public RenderTree {

} // namespace

RenderOrchestrator::RenderOrchestrator(bool backgroundLayerAsColor_, TaggedScheduler& threadPool_, const std::optional<std::string>& localFontFamily_)
RenderOrchestrator::RenderOrchestrator(bool backgroundLayerAsColor_,
TaggedScheduler& threadPool_,
const std::optional<std::string>& localFontFamily_)
: observer(&nullObserver()),
glyphManager(std::make_unique<GlyphManager>(std::make_unique<LocalGlyphRasterizer>(localFontFamily_))),
imageManager(std::make_unique<ImageManager>()),
Expand Down
4 changes: 3 additions & 1 deletion src/mbgl/renderer/render_orchestrator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ using ImmutableLayer = Immutable<style::Layer::Impl>;

class RenderOrchestrator final : public GlyphManagerObserver, public ImageManagerObserver, public RenderSourceObserver {
public:
RenderOrchestrator(bool backgroundLayerAsColor_, TaggedScheduler& threadPool_, const std::optional<std::string>& localFontFamily_);
RenderOrchestrator(bool backgroundLayerAsColor_,
TaggedScheduler& threadPool_,
const std::optional<std::string>& localFontFamily_);
~RenderOrchestrator() override;

void markContextLost() { contextLost = true; };
Expand Down
5 changes: 3 additions & 2 deletions test/api/custom_drawable_layer.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ class LineTestDrawableLayer : public mbgl::style::CustomDrawableLayerHost {
constexpr auto numPoints = 100;
GeometryCoordinates polyline;
for (auto ipoint{0}; ipoint < numPoints; ++ipoint) {
polyline.emplace_back(ipoint * util::EXTENT / numPoints,
static_cast<int16_t>(std::sin(ipoint * 2 * M_PI / numPoints) * util::EXTENT / numLines / 2.f));
polyline.emplace_back(
ipoint * util::EXTENT / numPoints,
static_cast<int16_t>(std::sin(ipoint * 2 * M_PI / numPoints) * util::EXTENT / numLines / 2.f));
}

for (auto index{0}; index < numLines; ++index) {
Expand Down

0 comments on commit 98832ea

Please sign in to comment.