Render HTML pages(web pages) on Skia

1 003 просмотра
Перейти к первому непрочитанному сообщению

Mohammed El-Dana

не прочитано,
1 июл. 2015 г., 00:21:0001.07.2015
– chromium...@chromium.org
Is there any c++ API or anyway to render html pages on SkBitmap or SkCanvas?

PhistucK

не прочитано,
1 июл. 2015 г., 06:33:1901.07.2015
– alda...@gmail.com, Chromium-discuss
What do you mean by "render"? You give it an HTML string (<!doctype html><div>hello</div>) and it outputs a screenshot of the rendered document (a bitmap of the word "Hello" printed, black on white, with 5 pixels of padding)?
If so, no - Blink is used to parse and render HTML.
Otherwise, please, elaborate.


PhistucK

On Wed, Jul 1, 2015 at 7:21 AM, Mohammed El-Dana <alda...@gmail.com> wrote:
Is there any c++ API or anyway to render html pages on SkBitmap or SkCanvas?

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Stephen Chenney

не прочитано,
1 июл. 2015 г., 09:34:2201.07.2015
– alda...@gmail.com, PhistucK Productions, Chromium-discuss, skia-d...@googlegroups.com
Right, there is no API that converts HTML to SkCanvas/SkBitmap explicitly anywhere in blink or chromium. But in principle it's not hard to hack chromium to generate such a thing. There is code in the cc system that generates a single large SkPicture from a display item list (in the new world of Slimming Paint) and you can trivially play that SkPicture into any SkCanvas (in fact, it is a subclass of SkCanvas). You need to define the viewport appropriately to get all the content. One place to look for code that sort of does this is the rasterize_and_record benchmark.

There are also JS APIs exposed by certain flags(--enable-gpu-benchmarking and something about skia debugging) that allow you to dump a set of SkPictures representing the page. The Skia team uses this to generate their regression testing archives. You can then write something to load in the SkPictures and convert to a bitmap. The Skia team might have that already.

Stephen.

Primiano Tucci

не прочитано,
1 июл. 2015 г., 10:00:0101.07.2015
– sche...@chromium.org, alda...@gmail.com, PhistucK Productions, Chromium-discuss, skia-d...@googlegroups.com
On android you can achieve pretty much what you ask using WebVIew's capturePicure. Not sure that fits your case then.
Primiano Tucci
Software Engineer
Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ

Primiano Tucci

не прочитано,
1 июл. 2015 г., 10:02:1201.07.2015
– sche...@chromium.org, alda...@gmail.com, PhistucK Productions, Chromium-discuss, skia-d...@googlegroups.com
[This time from the right address]

On android you can achieve pretty much what you ask using WebVIew's capturePicure. Not sure that fits your case then.

BlueIsGood2

не прочитано,
4 июл. 2015 г., 16:09:2304.07.2015
– chromium...@chromium.org, phis...@gmail.com, skia-d...@googlegroups.com, alda...@gmail.com, sche...@chromium.org

Dear Primiano
I know this may be very off topic to what is being discussed right now but I must ask you something.
I have seen your presence around this board ALOT so it should go without saying you know alot about chromium and its parts.
So i need to know is there any direct way i can contact (email, Aim, XMPP) i have some things i would like to discuss with you 
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений