@@ -253,6 +253,13 @@ void RenderHandler::OnPaint(CefRefPtr<CefBrowser> browser,
253253 const void * buffer,
254254 int width,
255255 int height) {
256+ // Debug output for regular paint calls
257+ printf (" [DEBUG] OnPaint (regular) called:\n " );
258+ printf (" - Type: %s\n " , type == PET_VIEW ? " VIEW" : " POPUP" );
259+ printf (" - Dirty rects count: %zu\n " , dirtyRects.size ());
260+ printf (" - Buffer: %p\n " , buffer);
261+ printf (" - Width: %d, Height: %d\n " , width, height);
262+
256263 ScopedJNIEnv env;
257264 if (!env)
258265 return ;
@@ -268,12 +275,21 @@ void RenderHandler::OnPaint(CefRefPtr<CefBrowser> browser,
268275 " Rectangle;Ljava/nio/ByteBuffer;II)V" ,
269276 jbrowser.get (), jtype, jrectArray.get (),
270277 jdirectBuffer.get (), width, height);
278+
279+ printf (" [DEBUG] OnPaint (regular) completed\n " );
271280}
272281
273282void RenderHandler::OnAcceleratedPaint (CefRefPtr<CefBrowser> browser,
274283 PaintElementType type,
275284 const RectList& dirtyRects,
276285 const CefAcceleratedPaintInfo& info) {
286+ // Debug output for accelerated paint calls
287+ printf (" [DEBUG] OnAcceleratedPaint called:\n " );
288+ printf (" - Type: %s\n " , type == PET_VIEW ? " VIEW" : " POPUP" );
289+ printf (" - Dirty rects count: %zu\n " , dirtyRects.size ());
290+ printf (" - Shared texture handle: 0x%llx\n " , reinterpret_cast <unsigned long long >(info.shared_texture_handle ));
291+ printf (" - Format: %d\n " , info.format );
292+
277293 ScopedJNIEnv env;
278294 if (!env)
279295 return ;
@@ -294,18 +310,26 @@ void RenderHandler::OnAcceleratedPaint(CefRefPtr<CefBrowser> browser,
294310 CefRect viewRect;
295311 GetViewRect (browser, viewRect);
296312
297- // Set the fields of the paint info object
298- SetJNIFieldLong (env, cls, jpaintInfo, " shared_texture_handle" ,
313+ // Set the fields of the paint info object SetJNIFieldLong(env, cls, jpaintInfo, "shared_texture_handle",
299314 reinterpret_cast <jlong>(info.shared_texture_handle ));
300315 SetJNIFieldInt (env, cls, jpaintInfo, " format" , info.format );
301316 SetJNIFieldInt (env, cls, jpaintInfo, " width" , viewRect.width );
302317 SetJNIFieldInt (env, cls, jpaintInfo, " height" , viewRect.height );
303318
319+ // Debug output for Java object values
320+ printf (" [DEBUG] Sending to Java:\n " );
321+ printf (" - shared_texture_handle: 0x%llx\n " , reinterpret_cast <unsigned long long >(info.shared_texture_handle ));
322+ printf (" - format: %d\n " , info.format );
323+ printf (" - width: %d (from viewRect)\n " , viewRect.width );
324+ printf (" - height: %d (from viewRect)\n " , viewRect.height );
325+
304326 JNI_CALL_VOID_METHOD (env, handle_, " onAcceleratedPaint" ,
305327 " (Lorg/cef/browser/CefBrowser;Z[Ljava/awt/"
306328 " Rectangle;Lorg/cef/handler/CefAcceleratedPaintInfo;)V" ,
307329 jbrowser.get (), jtype, jrectArray.get (),
308330 jpaintInfo.get ());
331+
332+ printf (" [DEBUG] OnAcceleratedPaint completed\n " );
309333}
310334
311335bool RenderHandler::StartDragging (CefRefPtr<CefBrowser> browser,
0 commit comments