Try to use a XE2 version... In my test works fine in XE3.
varRec: TBitmapData;begin//...Bitmap.Map(TMapAccess.maRead, Rec);try//work with Rec.DatafinallyBitmap.Unmap(Rec);end;//...end;
+1. Will DCEF3 be avaible for FM? When?
Середа, 19 вересня 2012 р. 08:11:35 UTC+3 користувач Александр Попов написав:
It's not help for me.
requiresrtl,// Commented out fmx as temporary fix for compiling in XE3// vcl,// fmx;vcl;contains// Commented out ceffmx as temporary fix for compiling in XE3// ceffmx in '..\src\ceffmx.pas',cefvcl in '..\src\cefvcl.pas',ceflib in '..\src\ceflib.pas',cefgui in '..\src\cefgui.pas',cefreg in 'cefreg.pas';
usesWindows, Messages, Classes,cefgui, ceflib,// Commented out Fmx Controls, Graphics as temporary fix for compiling in XE3//{$ifdef DELPHI16_UP}// Vcl.Controls, Vcl.Graphics//{$else}// Controls, Graphics//{$endif};Vcl.Controls, Vcl.Graphics;uses// Commented out Fmx AppEvnts as temporary fix for compiling in XE3//{$IFDEF DELPHI16_UP}// Vcl.AppEvnts;//{$ELSE}// AppEvnts;//{$ENDIF}Vcl.AppEvnts;
Thanks for VCL-version, but for VCL i can use DCEF3. But i want to use DCEF for Firemonkey XE3.
for c := 0 to dirtyRectsCount - 1 dobeginw := Width * 4;offset := ((dirtyRects[c].y * Width) + dirtyRects[c].x) * 4;src := @PByte(buffer)[offset];{$IFDEF VER240}//FBUffer.Clear(claBlack);FBuffer.Map(TMapAccess.maWrite, rec);try{$ELSE}dst := @PByte(StartLine)[offset];{$ENDIF}offset := dirtyRects[c].width * 4;for i := 0 to dirtyRects[c].height - 1 dobegin// for j := 0 to offset div 4 do// PAlphaColorArray(dst)[j] := PAlphaColorArray(src)[j] or $FF000000;{$IFDEF VER240}for j := 0 to dirtyRects[c].width - 1 dobeginSystem.Move(src^, color, 4);rec.SetPixel({dirtyRects[c].x+}j, {dirtyRects[c].y+}i, color);Inc(src, 4);end;{$ELSE}System.Move(src^, dst^, offset);Inc(dst, w);Inc(src, w);{$ENDIF}end;{$IFDEF VER240}finallyFBuffer.Unmap(rec);end;{$ENDIF}//InvalidateRect(ClipRect);InvalidateRect(RectF(dirtyRects[c].x, dirtyRects[c].y,dirtyRects[c].x + dirtyRects[c].width, dirtyRects[c].y + dirtyRects[c].height));end;
src := @PByte(buffer)[0];FBuffer.Map(TMapAccess.maWrite, rec);tryfor I := 0 to vh -1 dofor J := 0 to vw - 1 dobeginSystem.Move(src^, color, 4);rec.SetPixel(j, i, color);Inc(src, 4);end;finallyFBuffer.Unmap(rec);end;end;InvalidateRect(ClipRect);
Hi snake i tried your fixed version for fmx XE3, i added TChromiumFMX into my form, compiled, then when everything seemed to be ok the webpage doesnt get rendered properly. I have attatched a screenshot with the problem.It seems like any kind of graphics loading bugs the rendering of the page. If you resize it looks ok till you try and do something then the rendering distortion pops up.I would like to know if you have similar issues or im doing something wrong?Thanks for your time
src := @PByte(buffer)[0];FBuffer.Map(TMapAccess.maWrite, rec);tryfor I := 0 to vh -1 dofor J := 0 to vw - 1 dobeginSystem.Move(src^, color, 4);rec.SetPixel(j, i, color);Inc(src, 4);end;finallyFBuffer.Unmap(rec);end;end;InvalidateRect(ClipRect);
Confirmed working on delphi XE3 fmx form, thanks for the fix snake.And indeed i can notice some performance reduction compared to vcl but this will do for now :)
--
You received this message because you are subscribed to the Google Groups "delphichromiumembedded" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delphichromiumemb...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.