mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
LibWeb: Hide some debug logging behind CANVAS_RENDERING_CONTEXT_2D_DEBUG
This can be quite noisy and isn't generally useful information.
This commit is contained in:
parent
a2e6abe159
commit
1719862d12
Notes:
sideshowbarker
2024-07-17 17:56:24 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/1719862d12 Pull-request: https://github.com/SerenityOS/serenity/pull/12875 Reviewed-by: https://github.com/awesomekling ✅
@ -26,6 +26,10 @@
|
||||
#cmakedefine01 CALLBACK_MACHINE_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef CANVAS_RENDERING_CONTEXT_2D_DEBUG
|
||||
#cmakedefine01 CANVAS_RENDERING_CONTEXT_2D_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef COMPOSE_DEBUG
|
||||
#cmakedefine01 COMPOSE_DEBUG
|
||||
#endif
|
||||
|
@ -11,6 +11,7 @@ set(BMP_DEBUG ON)
|
||||
set(BXVGA_DEBUG ON)
|
||||
set(CACHE_DEBUG ON)
|
||||
set(CALLBACK_MACHINE_DEBUG ON)
|
||||
set(CANVAS_RENDERING_CONTEXT_2D_DEBUG ON)
|
||||
set(COMMIT_DEBUG ON)
|
||||
set(COMPOSE_DEBUG ON)
|
||||
set(CONTEXT_SWITCH_DEBUG ON)
|
||||
|
@ -4,6 +4,7 @@
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/ExtraMathConstants.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <LibGfx/Painter.h>
|
||||
@ -109,19 +110,19 @@ void CanvasRenderingContext2D::draw_image(const HTMLImageElement& image_element,
|
||||
|
||||
void CanvasRenderingContext2D::scale(float sx, float sy)
|
||||
{
|
||||
dbgln("CanvasRenderingContext2D::scale({}, {})", sx, sy);
|
||||
dbgln_if(CANVAS_RENDERING_CONTEXT_2D_DEBUG, "CanvasRenderingContext2D::scale({}, {})", sx, sy);
|
||||
m_drawing_state.transform.scale(sx, sy);
|
||||
}
|
||||
|
||||
void CanvasRenderingContext2D::translate(float tx, float ty)
|
||||
{
|
||||
dbgln("CanvasRenderingContext2D::translate({}, {})", tx, ty);
|
||||
dbgln_if(CANVAS_RENDERING_CONTEXT_2D_DEBUG, "CanvasRenderingContext2D::translate({}, {})", tx, ty);
|
||||
m_drawing_state.transform.translate(tx, ty);
|
||||
}
|
||||
|
||||
void CanvasRenderingContext2D::rotate(float radians)
|
||||
{
|
||||
dbgln("CanvasRenderingContext2D::rotate({})", radians);
|
||||
dbgln_if(CANVAS_RENDERING_CONTEXT_2D_DEBUG, "CanvasRenderingContext2D::rotate({})", radians);
|
||||
m_drawing_state.transform.rotate_radians(radians);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user