Skip to content

Commit c19090b

Browse files
committed
[PageLifeCycle] Use cairo-gl in PlatformDisplay only when Acc Canvas is enabled
1 parent cd5fe9d commit c19090b

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Source/WebCore/platform/graphics/PlatformDisplay.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@
8888
#include <wtf/glib/GRefPtr.h>
8989
#endif
9090

91-
#if USE(CAIRO)
91+
#if USE(CAIRO) && ENABLE(ACCELERATED_2D_CANVAS)
9292
#include <cairo-gl.h>
9393
#endif
9494

9595
namespace WebCore {
9696

97-
#if USE(CAIRO)
97+
#if USE(CAIRO) && ENABLE(ACCELERATED_2D_CANVAS)
9898
static cairo_device_t* s_cairoDevice { nullptr };
9999

100100
cairo_device_t* PlatformDisplay::cairoGLDevice()
@@ -247,7 +247,7 @@ GLContext* PlatformDisplay::sharingGLContext()
247247

248248
void PlatformDisplay::clearSharingGLContext()
249249
{
250-
#if USE(CAIRO)
250+
#if USE(CAIRO) && ENABLE(ACCELERATED_2D_CANVAS)
251251
clearCairoGLDevice();
252252
#endif
253253
m_sharingGLContext = nullptr;

Source/WebCore/platform/graphics/PlatformDisplay.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ typedef struct _GstGLDisplay GstGLDisplay;
5050
#include "LCMSUniquePtr.h"
5151
#endif
5252

53-
#if USE(CAIRO)
53+
#if USE(CAIRO) && ENABLE(ACCELERATED_2D_CANVAS)
5454
#include <cairo.h>
5555
#endif
5656

@@ -113,7 +113,7 @@ class PlatformDisplay {
113113
const String& accessibilityBusAddress() const;
114114
#endif
115115

116-
#if USE(CAIRO)
116+
#if USE(CAIRO) && ENABLE(ACCELERATED_2D_CANVAS)
117117
cairo_device_t* cairoGLDevice();
118118
#endif
119119

0 commit comments

Comments
 (0)