Skip to content

Commit

Permalink
Ignore overlay texture when hardware accelerated
Browse files Browse the repository at this point in the history
This fixes an issue where opening an <input type="date"> would result in
flickering between the base texture & a smaller texture of the date
picker. This brings behaviour in line with non-accelerated rendering.

Ideally PET_POPUP textures (both accelerated & not) should be properly
stored and rendered on top of the bs->texture displayed to the user.

For more info see #148
  • Loading branch information
WizardCM committed Oct 18, 2021
1 parent f7aa2dc commit b854309
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions browser-client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ void BrowserClient::OnPaint(CefRefPtr<CefBrowser>, PaintElementType type,
int height)
{
if (type != PET_VIEW) {
// TODO Overlay texture on top of bs->texture
return;
}

Expand Down Expand Up @@ -255,9 +256,15 @@ void BrowserClient::OnPaint(CefRefPtr<CefBrowser>, PaintElementType type,
}

#ifdef SHARED_TEXTURE_SUPPORT_ENABLED
void BrowserClient::OnAcceleratedPaint(CefRefPtr<CefBrowser>, PaintElementType,
const RectList &, void *shared_handle)
void BrowserClient::OnAcceleratedPaint(CefRefPtr<CefBrowser>,
PaintElementType type, const RectList &,
void *shared_handle)
{
if (type != PET_VIEW) {
// TODO Overlay texture on top of bs->texture
return;
}

if (!bs) {
return;
}
Expand Down

0 comments on commit b854309

Please sign in to comment.