@@ -5334,32 +5334,6 @@ index 892d8de6d345d91fda80cfa5334c4aa68b757da3..a22497d801a349487be10b15139e9c76
5334
5334
#endif
5335
5335
5336
5336
#if PLATFORM(IOS_FAMILY)
5337
- diff --git a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
5338
- index 34d935b359e2e74278928f7b5358ad3ea7a70ae2..ad6dbb9c9196baa9c1d280a8fe107a77f5457c2a 100644
5339
- --- a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
5340
- +++ b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
5341
- @@ -50,6 +50,10 @@
5342
- #include <cairo-gl.h>
5343
- #endif
5344
-
5345
- +#if PLATFORM(GTK)
5346
- +#include <cairo-xlib.h>
5347
- +#endif
5348
- +
5349
- #if OS(WINDOWS)
5350
- #include <cairo-win32.h>
5351
- #endif
5352
- @@ -331,6 +335,10 @@ IntSize cairoSurfaceSize(cairo_surface_t* surface)
5353
- ASSERT(surface);
5354
- ASSERT(cairo_surface_get_type(surface) == CAIRO_SURFACE_TYPE_IMAGE);
5355
- return IntSize(cairo_image_surface_get_width(surface), cairo_image_surface_get_height(surface));
5356
- +#endif
5357
- +#if PLATFORM(GTK)
5358
- + case CAIRO_SURFACE_TYPE_XLIB:
5359
- + return IntSize(cairo_xlib_surface_get_width(surface), cairo_xlib_surface_get_height(surface));
5360
- #endif
5361
- default:
5362
- ASSERT_NOT_REACHED();
5363
5337
diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp b/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp
5364
5338
index d79728555b7db9b59cb615c55a7a7a6851cb57c8..61d3cc4b488e35ef9e1afa1ce3ac5f5d60ebe9a7 100644
5365
5339
--- a/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp
@@ -8508,7 +8482,7 @@ index 6bbd1cabd27ae2847648a8c2edcf9acfcd556ff5..38d101b9a96986e40f6e9f0261fa429a
8508
8482
{
8509
8483
m_hasReceivedFirstUpdate = true;
8510
8484
diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
8511
- index d7695088e7cfc4f638f157338754f9f157489749..2a5ebd52478027c65d66551b77becbfb006a95c4 100644
8485
+ index d7695088e7cfc4f638f157338754f9f157489749..74a3654235d5e24a39d3714ec4d2f45a8803c816 100644
8512
8486
--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
8513
8487
+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
8514
8488
@@ -30,6 +30,8 @@
@@ -8526,12 +8500,12 @@ index d7695088e7cfc4f638f157338754f9f157489749..2a5ebd52478027c65d66551b77becbfb
8526
8500
const LayerTreeContext& layerTreeContext() const { return m_layerTreeContext; }
8527
8501
+ void waitForSizeUpdate(Function<void ()>&&);
8528
8502
+
8529
- + using PaintCallback = Function<void(cairo_surface_t*)>;
8503
+ + using PaintCallback = Function<void(cairo_surface_t*, WebCore::IntSize )>;
8530
8504
+ void setPaintCallback(PaintCallback&& callback) { m_paintCallback = WTFMove(callback); }
8531
- + void didPaint(cairo_surface_t* surface)
8505
+ + void didPaint(cairo_surface_t* surface, WebCore::IntSize size )
8532
8506
+ {
8533
8507
+ if (m_paintCallback)
8534
- + m_paintCallback(surface);
8508
+ + m_paintCallback(surface, size );
8535
8509
+ }
8536
8510
8537
8511
private:
@@ -8654,7 +8628,7 @@ index 59cdfdafab1d85ea3a5aecb3cd2293e6dfb1eb8d..52fe7990b1c18b964ee3cfa9f324e3c2
8654
8628
// The timeout we use when waiting for a DidUpdateGeometry message.
8655
8629
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
8656
8630
new file mode 100644
8657
- index 0000000000000000000000000000000000000000..b58cea323c822ca6352e1cf907ab214e25345592
8631
+ index 0000000000000000000000000000000000000000..c7257e534657af462bd095e6f5150b7a316c906d
8658
8632
--- /dev/null
8659
8633
+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
8660
8634
@@ -0,0 +1,253 @@
@@ -8793,12 +8767,12 @@ index 0000000000000000000000000000000000000000..b58cea323c822ca6352e1cf907ab214e
8793
8767
+ }
8794
8768
+
8795
8769
+ if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(m_page.drawingArea())) {
8796
- + m_encoder = ScreencastEncoder::create(errorString, file, drawingArea->size().width(), drawingArea->size().height() );
8770
+ + m_encoder = ScreencastEncoder::create(errorString, file, drawingArea->size());
8797
8771
+ if (!m_encoder)
8798
8772
+ return;
8799
8773
+
8800
- + drawingArea->setPaintCallback([encoder = m_encoder.get()] (cairo_surface_t* surface) {
8801
- + encoder->encodeFrame(surface);
8774
+ + drawingArea->setPaintCallback([encoder = m_encoder.get()] (cairo_surface_t* surface, WebCore::IntSize size ) {
8775
+ + encoder->encodeFrame(surface, size );
8802
8776
+ });
8803
8777
+ } else {
8804
8778
+ errorString = "Cannot get drawing area."_s;
@@ -9004,10 +8978,10 @@ index 0000000000000000000000000000000000000000..77d4a06e4717629916241dc47cb057f4
9004
8978
+} // namespace WebKit
9005
8979
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
9006
8980
new file mode 100644
9007
- index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105fab943b1
8981
+ index 0000000000000000000000000000000000000000..33ba73912ecfc92622d829ddde6fcea933728d4b
9008
8982
--- /dev/null
9009
8983
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
9010
- @@ -0,0 +1,400 @@
8984
+ @@ -0,0 +1,406 @@
9011
8985
+/*
9012
8986
+ * Copyright (c) 2010, The WebM Project authors. All rights reserved.
9013
8987
+ * Copyright (c) 2013 The Chromium Authors. All rights reserved.
@@ -9038,7 +9012,6 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9038
9012
+#include "config.h"
9039
9013
+#include "ScreencastEncoder.h"
9040
9014
+
9041
- +#include <WebCore/CairoUtilities.h>
9042
9015
+#include <cairo.h>
9043
9016
+#include <libyuv.h>
9044
9017
+#include <vpx/vp8.h>
@@ -9057,17 +9030,17 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9057
9030
+// map for the encoder.
9058
9031
+const int kMacroBlockSize = 16;
9059
9032
+
9060
- +void createImage(IntSize size ,
9033
+ +void createImage(unsigned int width, unsigned int height ,
9061
9034
+ std::unique_ptr<vpx_image_t>& out_image,
9062
9035
+ std::unique_ptr<uint8_t[]>& out_image_buffer) {
9063
9036
+ std::unique_ptr<vpx_image_t> image(new vpx_image_t());
9064
9037
+ memset(image.get(), 0, sizeof(vpx_image_t));
9065
9038
+
9066
9039
+ // libvpx seems to require both to be assigned.
9067
- + image->d_w = size. width() ;
9068
- + image->w = size. width() ;
9069
- + image->d_h = size. height() ;
9070
- + image->h = size. height() ;
9040
+ + image->d_w = width;
9041
+ + image->w = width;
9042
+ + image->d_h = height;
9043
+ + image->h = height;
9071
9044
+
9072
9045
+ // I420
9073
9046
+ image->fmt = VPX_IMG_FMT_YV12;
@@ -9170,48 +9143,37 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9170
9143
+ WTF_MAKE_NONCOPYABLE(VPXFrame);
9171
9144
+ WTF_MAKE_FAST_ALLOCATED;
9172
9145
+public:
9173
- + VPXFrame(RefPtr<cairo_surface_t>&& surface, IntSize size )
9146
+ + explicit VPXFrame(RefPtr<cairo_surface_t>&& surface)
9174
9147
+ : m_surface(WTFMove(surface))
9175
- + , m_size(size)
9176
9148
+ { }
9177
9149
+
9178
9150
+ void setDuration(int duration) { m_duration = duration; }
9179
9151
+ int duration() const { return m_duration; }
9180
9152
+
9181
- + vpx_image_t* convertToVpxImage()
9153
+ + void convertToVpxImage(vpx_image_t* image )
9182
9154
+ {
9183
- + if (m_image)
9184
- + return m_image.get();
9185
- +
9186
- + createImage(m_size, m_image, m_imageBuffer);
9187
- +
9188
9155
+ // Convert the updated region to YUV ready for encoding.
9189
9156
+ const uint8_t* rgba_data = cairo_image_surface_get_data(m_surface.get());
9190
9157
+ int rgba_stride = cairo_image_surface_get_stride(m_surface.get());
9191
9158
+
9192
- + const int y_stride = m_image ->stride[0];
9193
- + ASSERT(m_image ->stride[1] == m_image ->stride[2]);
9194
- + const int uv_stride = m_image ->stride[1];
9195
- + uint8_t* y_data = m_image ->planes[0];
9196
- + uint8_t* u_data = m_image ->planes[1];
9197
- + uint8_t* v_data = m_image ->planes[2];
9159
+ + const int y_stride = image ->stride[0];
9160
+ + ASSERT(image ->stride[1] == image ->stride[2]);
9161
+ + const int uv_stride = image ->stride[1];
9162
+ + uint8_t* y_data = image ->planes[0];
9163
+ + uint8_t* u_data = image ->planes[1];
9164
+ + uint8_t* v_data = image ->planes[2];
9198
9165
+
9199
9166
+ // TODO: redraw only damaged regions?
9200
9167
+ libyuv::ARGBToI420(rgba_data, rgba_stride,
9201
9168
+ y_data, y_stride,
9202
9169
+ u_data, uv_stride,
9203
9170
+ v_data, uv_stride,
9204
- + m_size.width(), m_size.height());
9205
- +
9206
- + return m_image.get();
9171
+ + image->w, image->h);
9207
9172
+ }
9208
9173
+
9209
9174
+private:
9210
9175
+ RefPtr<cairo_surface_t> m_surface;
9211
- + IntSize m_size;
9212
9176
+ int m_duration = 0;
9213
- + std::unique_ptr<uint8_t[]> m_imageBuffer;
9214
- + std::unique_ptr<vpx_image_t> m_image;
9215
9177
+};
9216
9178
+
9217
9179
+
@@ -9225,12 +9187,15 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9225
9187
+ , m_file(file)
9226
9188
+ {
9227
9189
+ ivf_write_file_header(m_file, &m_cfg, m_fourcc, 0);
9190
+ +
9191
+ + createImage(cfg.g_w, cfg.g_h, m_image, m_imageBuffer);
9228
9192
+ }
9229
9193
+
9230
9194
+ void encodeFrameAsync(std::unique_ptr<VPXFrame>&& frame)
9231
9195
+ {
9232
9196
+ m_encoderQueue->dispatch([this, frame = WTFMove(frame)] {
9233
- + encodeFrame(frame->convertToVpxImage(), frame->duration());
9197
+ + frame->convertToVpxImage(m_image.get());
9198
+ + encodeFrame(m_image.get(), frame->duration());
9234
9199
+ });
9235
9200
+ }
9236
9201
+
@@ -9294,11 +9259,15 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9294
9259
+ FILE* m_file { nullptr };
9295
9260
+ int m_frameCount { 0 };
9296
9261
+ int64_t m_pts { 0 };
9262
+ + std::unique_ptr<uint8_t[]> m_imageBuffer;
9263
+ + std::unique_ptr<vpx_image_t> m_image;
9297
9264
+};
9298
9265
+
9299
- +ScreencastEncoder::ScreencastEncoder(std::unique_ptr<VPXCodec>&& vpxCodec)
9266
+ +ScreencastEncoder::ScreencastEncoder(std::unique_ptr<VPXCodec>&& vpxCodec, IntSize size )
9300
9267
+ : m_vpxCodec(WTFMove(vpxCodec))
9268
+ + , m_size(size)
9301
9269
+{
9270
+ + ASSERT(!size.isZero());
9302
9271
+}
9303
9272
+
9304
9273
+ScreencastEncoder::~ScreencastEncoder()
@@ -9311,7 +9280,7 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9311
9280
+static const int fps = 30;
9312
9281
+
9313
9282
+
9314
- +RefPtr<ScreencastEncoder> ScreencastEncoder::create(String& errorString, const String& filePath, int w, int h )
9283
+ +RefPtr<ScreencastEncoder> ScreencastEncoder::create(String& errorString, const String& filePath, IntSize size )
9315
9284
+{
9316
9285
+ const uint32_t fourcc = VP8_FOURCC;
9317
9286
+ vpx_codec_iface_t* codec_interface = vpx_codec_vp8_cx();
@@ -9320,8 +9289,8 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9320
9289
+ return nullptr;
9321
9290
+ }
9322
9291
+
9323
- + if (w <= 0 || h <= 0 || (w % 2) != 0 || (h % 2) != 0) {
9324
- + errorString = makeString("Invalid frame size: "_s, w , "x"_s, h );
9292
+ + if (size.width() <= 0 || size.height() <= 0 || (size.width() % 2) != 0 || (size.height() % 2) != 0) {
9293
+ + errorString = makeString("Invalid frame size: "_s, size.width() , "x"_s, size.height() );
9325
9294
+ return nullptr;
9326
9295
+ }
9327
9296
+
@@ -9333,8 +9302,8 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9333
9302
+ return nullptr;
9334
9303
+ }
9335
9304
+
9336
- + cfg.g_w = w ;
9337
- + cfg.g_h = h ;
9305
+ + cfg.g_w = size.width() ;
9306
+ + cfg.g_h = size.height() ;
9338
9307
+ cfg.g_timebase.num = 1;
9339
9308
+ cfg.g_timebase.den = fps;
9340
9309
+ cfg.g_error_resilient = VPX_ERROR_RESILIENT_DEFAULT;
@@ -9353,7 +9322,7 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9353
9322
+
9354
9323
+ std::unique_ptr<VPXCodec> vpxCodec(new VPXCodec(fourcc, codec, cfg, file));
9355
9324
+ fprintf(stderr, "ScreencastEncoder initialized with: %s\n", vpx_codec_iface_name(codec_interface));
9356
- + return adoptRef(new ScreencastEncoder(WTFMove(vpxCodec)));
9325
+ + return adoptRef(new ScreencastEncoder(WTFMove(vpxCodec), size ));
9357
9326
+}
9358
9327
+
9359
9328
+void ScreencastEncoder::flushLastFrame()
@@ -9368,27 +9337,38 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9368
9337
+ m_lastFrameTimestamp = now;
9369
9338
+}
9370
9339
+
9371
- +void ScreencastEncoder::encodeFrame(cairo_surface_t* drawingAreaSurface)
9340
+ +void ScreencastEncoder::encodeFrame(cairo_surface_t* drawingAreaSurface, IntSize size )
9372
9341
+{
9373
9342
+ fprintf(stderr, "ScreencastEncoder::encodeFrame\n");
9374
9343
+ flushLastFrame();
9375
- + IntSize size = cairoSurfaceSize(drawingAreaSurface);
9376
9344
+ if (size.isZero()) {
9377
9345
+ fprintf(stderr, "Cairo surface size is 0\n");
9378
9346
+ return;
9379
9347
+ }
9380
9348
+
9381
- + // TODO: scale image if the size has changed.
9382
9349
+ // TODO: adjust device scale factor?
9383
- + RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, size .width(), size .height()));
9350
+ + RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, m_size .width(), m_size .height()));
9384
9351
+ {
9385
9352
+ RefPtr<cairo_t> cr = adoptRef(cairo_create(surface.get()));
9353
+ +
9354
+ + cairo_matrix_t transform;
9355
+ + if (size.width() > m_size.width() || size.height() > m_size.height()) {
9356
+ + double sx = static_cast<double>(m_size.width()) / size.width();
9357
+ + double sy = static_cast<double>(m_size.height()) / size.height();
9358
+ + if (sx < sy)
9359
+ + sy = sx;
9360
+ + else
9361
+ + sx = sy;
9362
+ + cairo_matrix_init_scale(&transform, sx, sy);
9363
+ + cairo_transform(cr.get(), &transform);
9364
+ + }
9365
+ +
9386
9366
+ cairo_set_source_surface(cr.get(), drawingAreaSurface, 0, 0);
9387
9367
+ cairo_paint(cr.get());
9388
9368
+ }
9389
9369
+ cairo_surface_flush(surface.get());
9390
9370
+
9391
- + m_lastFrame = makeUnique<VPXFrame>(WTFMove(surface), size );
9371
+ + m_lastFrame = makeUnique<VPXFrame>(WTFMove(surface));
9392
9372
+}
9393
9373
+
9394
9374
+void ScreencastEncoder::finish(Function<void()>&& callback)
@@ -9410,10 +9390,10 @@ index 0000000000000000000000000000000000000000..46b324bf95e2d61fd4b9e67b7d646105
9410
9390
+} // namespace WebKit
9411
9391
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h
9412
9392
new file mode 100644
9413
- index 0000000000000000000000000000000000000000..b0c8e5aadcdc44e741fe1b2df5f28eee20f7be3f
9393
+ index 0000000000000000000000000000000000000000..01993e4925b6bea6741873e503f1fc3b401facee
9414
9394
--- /dev/null
9415
9395
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h
9416
- @@ -0,0 +1,59 @@
9396
+ @@ -0,0 +1,61 @@
9417
9397
+/*
9418
9398
+ * Copyright (C) 2020 Microsoft Corporation.
9419
9399
+ *
@@ -9441,6 +9421,7 @@ index 0000000000000000000000000000000000000000..b0c8e5aadcdc44e741fe1b2df5f28eee
9441
9421
+
9442
9422
+#pragma once
9443
9423
+
9424
+ +#include <WebCore/IntSize.h>
9444
9425
+#include <wtf/Forward.h>
9445
9426
+#include <wtf/Noncopyable.h>
9446
9427
+#include <wtf/ThreadSafeRefCounted.h>
@@ -9454,19 +9435,20 @@ index 0000000000000000000000000000000000000000..b0c8e5aadcdc44e741fe1b2df5f28eee
9454
9435
+ WTF_MAKE_NONCOPYABLE(ScreencastEncoder);
9455
9436
+ WTF_MAKE_FAST_ALLOCATED;
9456
9437
+public:
9457
- + static RefPtr<ScreencastEncoder> create(String& errorString, const String& filePath, int width, int height );
9438
+ + static RefPtr<ScreencastEncoder> create(String& errorString, const String& filePath, WebCore::IntSize );
9458
9439
+
9459
9440
+ class VPXCodec;
9460
- + explicit ScreencastEncoder(std::unique_ptr<VPXCodec>&&);
9441
+ + ScreencastEncoder(std::unique_ptr<VPXCodec>&&, WebCore::IntSize );
9461
9442
+ ~ScreencastEncoder();
9462
9443
+
9463
- + void encodeFrame(cairo_surface_t*);
9444
+ + void encodeFrame(cairo_surface_t*, WebCore::IntSize );
9464
9445
+ void finish(Function<void()>&& callback);
9465
9446
+
9466
9447
+private:
9467
9448
+ void flushLastFrame();
9468
9449
+
9469
9450
+ std::unique_ptr<VPXCodec> m_vpxCodec;
9451
+ + const WebCore::IntSize m_size;
9470
9452
+ MonotonicTime m_lastFrameTimestamp;
9471
9453
+ class VPXFrame;
9472
9454
+ std::unique_ptr<VPXFrame> m_lastFrame;
@@ -12745,7 +12727,7 @@ index 964c6315e38f5e0a0303febce45b1e975054f0b4..117d8c7c74bc81b34cfc0fe2b11a5429
12745
12727
UniqueRef<SOAuthorizationCoordinator> m_soAuthorizationCoordinator;
12746
12728
#endif
12747
12729
diff --git a/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp b/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp
12748
- index dc0a70b8824afdc7ec3dd1f69f4d9b51942924f6..012bf01a2307986292589ab1808f1df05dc060f7 100644
12730
+ index dc0a70b8824afdc7ec3dd1f69f4d9b51942924f6..f31988b5b9b896f17994bcf15c72b5f384d65afb 100644
12749
12731
--- a/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp
12750
12732
+++ b/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp
12751
12733
@@ -27,6 +27,7 @@
@@ -12762,7 +12744,7 @@ index dc0a70b8824afdc7ec3dd1f69f4d9b51942924f6..012bf01a2307986292589ab1808f1df0
12762
12744
cairo_restore(context);
12763
12745
+#if PLATFORM(GTK)
12764
12746
+ if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(m_webPageProxy.drawingArea()))
12765
- + drawingArea->didPaint(m_backend->surface());
12747
+ + drawingArea->didPaint(m_backend->surface(), drawingArea->size() );
12766
12748
+#endif
12767
12749
}
12768
12750
@@ -13017,15 +12999,15 @@ index 0000000000000000000000000000000000000000..df62288c96e8ffda5b318b2c28beb2d7
13017
12999
+
13018
13000
+#endif // ENABLE(REMOTE_INSPECTOR)
13019
13001
diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp
13020
- index be19b6007c9c0fbfffb859e40fd34751493fe7d1..bedd37fb70f878b9bf87beef0f9968c1ec24457e 100644
13002
+ index be19b6007c9c0fbfffb859e40fd34751493fe7d1..dd51b743f0bb5ba5a537edd1caf0005054c89839 100644
13021
13003
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp
13022
13004
+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp
13023
13005
@@ -256,6 +256,9 @@ bool AcceleratedBackingStoreX11::paint(cairo_t* cr, const IntRect& clipRect)
13024
13006
13025
13007
cairo_restore(cr);
13026
13008
13027
13009
+ if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(m_webPage.drawingArea()))
13028
- + drawingArea->didPaint(m_surface.get());
13010
+ + drawingArea->didPaint(m_surface.get(), drawingArea->size() );
13029
13011
+
13030
13012
cairo_surface_flush(m_surface.get());
13031
13013
0 commit comments