1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Issue #271 is fixed

Removed workaround from TBufferPanel, TFMXBufferPanel and demos.
This commit is contained in:
Salvador Díaz Fau
2020-04-04 10:58:48 +02:00
parent fef076d4ea
commit c9b2af2a5e
11 changed files with 33 additions and 128 deletions

View File

@@ -587,27 +587,11 @@ end;
procedure TBrowserFrame.FMXChromium1GetViewRect(Sender: TObject;
const browser: ICefBrowser; var rect: TCefRect);
var
TempScale : single;
begin
rect.x := 0;
rect.y := 0;
rect.width := round(FMXBufferPanel1.Width);
rect.height := round(FMXBufferPanel1.Height);
// Workaround for CEF4Delphi issue #271 (CEF issue #2833)
// https://github.com/salvadordf/CEF4Delphi/issues/271
// https://bitbucket.org/chromiumembedded/cef/issues/2833/osr-gpu-consume-cpu-and-may-not-draw
if GlobalCEFApp.EnableGPU then
begin
TempScale := FMXBufferPanel1.ScreenScale;
if (TempScale <> 1) then
begin
while (Frac(rect.width * TempScale) <> 0) do dec(rect.width);
while (Frac(rect.height * TempScale) <> 0) do dec(rect.height);
end;
end;
end;
procedure TBrowserFrame.FMXChromium1LoadError(Sender: TObject;