[chromium-dev] Re: How does chromium use SkCanvas

2009-06-29 Thread n179911

Thank you very much for the detailed response.

On Mon, Jun 29, 2009 at 4:49 AM, Amanda Walker wrote:
> Sorry for the typos--I'm still working on my first coffee of the day :-).
>
> On Mon, Jun 29, 2009 at 7:47 AM, Amanda Walker wrote:
>> There are no active plans at the moment, but it could be done if a
>> strong reason to arose.
>
> to -> to do so
>
>> code charing with Apple.
>
> charing -> sharing
>
> --Amanda
> (off to finish that coffee)
>

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium use SkCanvas

2009-06-29 Thread Amanda Walker

Sorry for the typos--I'm still working on my first coffee of the day :-).

On Mon, Jun 29, 2009 at 7:47 AM, Amanda Walker wrote:
> There are no active plans at the moment, but it could be done if a
> strong reason to arose.

to -> to do so

> code charing with Apple.

charing -> sharing

--Amanda
(off to finish that coffee)

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium use SkCanvas

2009-06-29 Thread Amanda Walker

2009/6/29 PhistucK :
> Are there any plans of moving to Skia on Mac?

There are no active plans at the moment, but it could be done if a
strong reason to arose.

> Why is it not used, anyway?

There are a few reasons, mostly centered around rendering fidelity:

- For text, we wanted to use CoreGraphics/ATSUI/etc. in order to
render text that looks right to Mac users (especially antialiasing and
hinting), and handles laying out Unicode text properly.  Windows has
the same concern, which is why it uses GDI and calls system DLLs to
draw text instead of using Skia.  Note that Apple provided the latter
as an option after Safari for Windows was released--users are very
picky about text rendering details.

- We knew that plugins would require maintaining a CoreGraphics drawing context.

- The already working, debugged code for rendering with CoreGraphics
was the most complete drawing code in WebKit.  This was not true for
Windows (remember that Apple's windows port of WebKit actually uses a
private port of CoreGraphics, which is not redistributable).

This presented the following major alternatives:

(a) Use Skia the way the Windows version does, and jump out to
CoreGraphics just for text.
(b) Use Skia for everything, and use FreeType for text rasterization
plus Pango for unicode layout.
(c) Use the existing CoreGraphics drawing code, and refactor USE(CG)
vs PLATFORM(MAC) where necessary.

We had (and probably still have) some advocates for (a)--it would
increase code sharing between the Mac and Windows versions of
Chromium.  (b) is basically the approach that the Linux version uses.
(c) provided the highest degree of fidelity with Safari and with
platform rendering expectations, and provides the greatest amount of
code charing with Apple.

It also seemed the least complex at the time we had to chose (since we
didn't have the linux version as a reference point for how much effort
would be involved in (b), it was really a choice between (a) and (c)).
 We actually tried (a) initially, but it turned out to be quite a bit
more complex than it appeared, so we fell back to (c).  In the mean
time, a bunch of that code has been reworked and cleaned up (mostly by
Brett Wilson), so revisiting the use of Skia for more (or all)
rendering on the Mac might be less complex now than it was initially.

Does that help?

--Amanda

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium use SkCanvas

2009-06-28 Thread PhistucK
Are there any plans of moving to Skia on Mac?Why is it not used, anyway?

☆PhistucK


On Mon, Jun 29, 2009 at 03:33, Amanda Walker  wrote:

>
> The Mac OS X port uses CoreGraphics to render page contents rather
> than Skia (it shares most of the rendering code with Apple's mac port,
> though Skia is used elsewhere in Mac Chrome for a variety of
> purposes).  If you are trying to learn more about Skia, I would
> suggest trying the Linux version (which uses Skia for page rendering)
> or the Windows version (which uses Skia for page rendering except for
> text).
>
> --Amanda
>
>
> On Sun, Jun 28, 2009 at 7:57 PM, n179911 wrote:
> >
> > Thank you to both answer.
> >
> > I am just running/debugging the TestShell XCode project. So I expect
> > to break the painting code, but it did not.
> >
> > Thank you.
> >
> >
> > On Sun, Jun 28, 2009 at 4:40 PM, Adam Langley wrote:
> >> On Sun, Jun 28, 2009 at 2:58 PM, n179911 wrote:
> >>> I assume the following function get calls,
> >>>
> >>> SkCanvas::drawRoundRect
> >>> SkCanvas::drawRect
> >>> SkCanvas::drawLine
> >>>
> >>> But when I set breakpoints at the above methods, it never breaks when
> >>> I load the a page with DIV tags.
> >>>
> >>> Can you please tell me how chromium paints a Rect on screen? In the
> >>> example i mentioned above.
> >>
> >> Keep in mind that Chromium is multi-process. You are probably setting
> >> those breakpoints in the browser process, but it's the renderer
> >> process which does the painting.
> >>
> >>
> >>
> >> AGL
> >>
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium use SkCanvas

2009-06-28 Thread Amanda Walker

That is generally correct, though there are some minor differences
(for example, painting form controls).

--Amanda


On Sun, Jun 28, 2009 at 8:55 PM, n179911 wrote:
> Thanks. I am trying to know how chromium on MacOSX paints content
> (like background for div (div/table cell), text). So I now I assume
> Chromium on MacOSX and WebKit are using the same library  , i.e. not
> Skia .
>
>
>
> On Sun, Jun 28, 2009 at 5:33 PM, Amanda Walker wrote:
>> The Mac OS X port uses CoreGraphics to render page contents rather
>> than Skia (it shares most of the rendering code with Apple's mac port,
>> though Skia is used elsewhere in Mac Chrome for a variety of
>> purposes).  If you are trying to learn more about Skia, I would
>> suggest trying the Linux version (which uses Skia for page rendering)
>> or the Windows version (which uses Skia for page rendering except for
>> text).
>>
>> --Amanda
>>
>>
>> On Sun, Jun 28, 2009 at 7:57 PM, n179911 wrote:
>>>
>>> Thank you to both answer.
>>>
>>> I am just running/debugging the TestShell XCode project. So I expect
>>> to break the painting code, but it did not.
>>>
>>> Thank you.
>>>
>>>
>>> On Sun, Jun 28, 2009 at 4:40 PM, Adam Langley wrote:
 On Sun, Jun 28, 2009 at 2:58 PM, n179911 wrote:
> I assume the following function get calls,
>
> SkCanvas::drawRoundRect
> SkCanvas::drawRect
> SkCanvas::drawLine
>
> But when I set breakpoints at the above methods, it never breaks when
> I load the a page with DIV tags.
>
> Can you please tell me how chromium paints a Rect on screen? In the
> example i mentioned above.

 Keep in mind that Chromium is multi-process. You are probably setting
 those breakpoints in the browser process, but it's the renderer
 process which does the painting.



 AGL

>>>
>>> >>>
>>>
>>
>

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium use SkCanvas

2009-06-28 Thread n179911

Thanks. I am trying to know how chromium on MacOSX paints content
(like background for div (div/table cell), text). So I now I assume
Chromium on MacOSX and WebKit are using the same library  , i.e. not
Skia .



On Sun, Jun 28, 2009 at 5:33 PM, Amanda Walker wrote:
> The Mac OS X port uses CoreGraphics to render page contents rather
> than Skia (it shares most of the rendering code with Apple's mac port,
> though Skia is used elsewhere in Mac Chrome for a variety of
> purposes).  If you are trying to learn more about Skia, I would
> suggest trying the Linux version (which uses Skia for page rendering)
> or the Windows version (which uses Skia for page rendering except for
> text).
>
> --Amanda
>
>
> On Sun, Jun 28, 2009 at 7:57 PM, n179911 wrote:
>>
>> Thank you to both answer.
>>
>> I am just running/debugging the TestShell XCode project. So I expect
>> to break the painting code, but it did not.
>>
>> Thank you.
>>
>>
>> On Sun, Jun 28, 2009 at 4:40 PM, Adam Langley wrote:
>>> On Sun, Jun 28, 2009 at 2:58 PM, n179911 wrote:
 I assume the following function get calls,

 SkCanvas::drawRoundRect
 SkCanvas::drawRect
 SkCanvas::drawLine

 But when I set breakpoints at the above methods, it never breaks when
 I load the a page with DIV tags.

 Can you please tell me how chromium paints a Rect on screen? In the
 example i mentioned above.
>>>
>>> Keep in mind that Chromium is multi-process. You are probably setting
>>> those breakpoints in the browser process, but it's the renderer
>>> process which does the painting.
>>>
>>>
>>>
>>> AGL
>>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium use SkCanvas

2009-06-28 Thread Amanda Walker

The Mac OS X port uses CoreGraphics to render page contents rather
than Skia (it shares most of the rendering code with Apple's mac port,
though Skia is used elsewhere in Mac Chrome for a variety of
purposes).  If you are trying to learn more about Skia, I would
suggest trying the Linux version (which uses Skia for page rendering)
or the Windows version (which uses Skia for page rendering except for
text).

--Amanda


On Sun, Jun 28, 2009 at 7:57 PM, n179911 wrote:
>
> Thank you to both answer.
>
> I am just running/debugging the TestShell XCode project. So I expect
> to break the painting code, but it did not.
>
> Thank you.
>
>
> On Sun, Jun 28, 2009 at 4:40 PM, Adam Langley wrote:
>> On Sun, Jun 28, 2009 at 2:58 PM, n179911 wrote:
>>> I assume the following function get calls,
>>>
>>> SkCanvas::drawRoundRect
>>> SkCanvas::drawRect
>>> SkCanvas::drawLine
>>>
>>> But when I set breakpoints at the above methods, it never breaks when
>>> I load the a page with DIV tags.
>>>
>>> Can you please tell me how chromium paints a Rect on screen? In the
>>> example i mentioned above.
>>
>> Keep in mind that Chromium is multi-process. You are probably setting
>> those breakpoints in the browser process, but it's the renderer
>> process which does the painting.
>>
>>
>>
>> AGL
>>
>
> >
>

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium use SkCanvas

2009-06-28 Thread nakro

Just to add to what adam said, if you are using Windows
right click the 'chrome' project and in the properties section
navigate to debug, and add
--single-process
to the command line args section

your breakpoints will now hit also from the renderer as chrome is now
only multi threwaded VS multi process
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium use SkCanvas

2009-06-28 Thread n179911

Thank you to both answer.

I am just running/debugging the TestShell XCode project. So I expect
to break the painting code, but it did not.

Thank you.


On Sun, Jun 28, 2009 at 4:40 PM, Adam Langley wrote:
> On Sun, Jun 28, 2009 at 2:58 PM, n179911 wrote:
>> I assume the following function get calls,
>>
>> SkCanvas::drawRoundRect
>> SkCanvas::drawRect
>> SkCanvas::drawLine
>>
>> But when I set breakpoints at the above methods, it never breaks when
>> I load the a page with DIV tags.
>>
>> Can you please tell me how chromium paints a Rect on screen? In the
>> example i mentioned above.
>
> Keep in mind that Chromium is multi-process. You are probably setting
> those breakpoints in the browser process, but it's the renderer
> process which does the painting.
>
>
>
> AGL
>

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium use SkCanvas

2009-06-28 Thread Adam Langley

On Sun, Jun 28, 2009 at 2:58 PM, n179911 wrote:
> I assume the following function get calls,
>
> SkCanvas::drawRoundRect
> SkCanvas::drawRect
> SkCanvas::drawLine
>
> But when I set breakpoints at the above methods, it never breaks when
> I load the a page with DIV tags.
>
> Can you please tell me how chromium paints a Rect on screen? In the
> example i mentioned above.

Keep in mind that Chromium is multi-process. You are probably setting
those breakpoints in the browser process, but it's the renderer
process which does the painting.



AGL

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---