Skip to content

Commit

Permalink
removed mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
mehah committed Nov 26, 2023
1 parent 8ae69c2 commit 6047a5c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/framework/graphics/framebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ void FrameBuffer::bind()
g_painter->setResolution(getSize(), m_textureMatrix);
g_painter->setAlphaWriting(m_useAlphaWriting);

std::scoped_lock l(m_mutex);
if (m_colorClear != Color::alpha) {
g_painter->setTexture(nullptr);
g_painter->setColor(m_colorClear);
Expand Down Expand Up @@ -134,8 +133,6 @@ void FrameBuffer::prepare(const Rect& dest, const Rect& src, const Color& colorC
const auto& _dest = dest.isValid() ? dest : Rect(0, 0, getSize());
const auto& _src = src.isValid() ? src : Rect(0, 0, getSize());

std::unique_lock l(m_mutex);

if (m_colorClear != colorClear)
m_colorClear = colorClear;

Expand Down
3 changes: 0 additions & 3 deletions src/framework/graphics/framebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class FrameBuffer
bool resize(const Size& size);
bool isValid() const { return m_texture != nullptr; }
bool canDraw() const {
std::scoped_lock l(m_mutex);
return m_texture && m_coordsBuffer.getVertexCount() > 0;
}
TexturePtr getTexture() const { return m_texture; }
Expand Down Expand Up @@ -85,6 +84,4 @@ class FrameBuffer

CoordsBuffer m_coordsBuffer;
CoordsBuffer m_screenCoordsBuffer;

mutable std::shared_mutex m_mutex;
};

0 comments on commit 6047a5c

Please sign in to comment.