[webkit-dev] Help regarding rendering in haiku

2019-07-27 Thread Rajagopalan Gangadharan
Hello guys,

I would like to say few things about current state of the port
1) We have working IPC
2) We have all process up and running

We decided to give Coordinated graphics a try - atleast until getting
something meaningful rendered on screen. We were able to create a bitmap in
webprocess and display it on UIProcess.
When i enter a URL i could see title of the page working. So i believe
webprocess(WebCore/page) and networkprocess are in state.

Now my problem is that I tried debugging graphics context's( i believe they
are responsible for rendering various elements on to tiles) operations with
printf statements to see what stuff are actually getting executed. I could
only see operations like scale,transform getting performed and thats it
page loading is done. This happens for any url (even about:blank) what i
think about this is it is maybe trying to set the viewport to right
size(correct me here). So it would be helpful if anyone could tell me what
am i missing ...

https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/tree/networkprocess-iteration-2
-
source code

Thank you very much guys!

Regards
G.Rajagopalan
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Help regarding coordinated graphics

2019-07-19 Thread Rajagopalan Gangadharan
>Find me on #webkit IRC
>noamr
>(I will try to be on there during next week)

Thank you so much :)
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Help regarding coordinated graphics

2019-07-16 Thread Rajagopalan Gangadharan
Hello everybody

As you guys know we have been working on porting webkit2 to haiku.
https://github.com/haiku/webkit/tree/webkit2

So we have a working IPC, network process and minibrowser configured to
test the api.
Now the most important part is to get it rendering. Currently we would like
to use coordinated graphics to acheive the same as it helps us to figure
out which would be better for our platform and also to make sure all other
things are in place. It would be helpful if you guys take time to clarify
my queries :)

1) How does this coordinated graphics model work ( i read the trac still i
couldnt get a good hold of it)
->i couldnt get the flow right im just confused
2) Which part of webprocess instructs or stores info about drawing onto to
a sharable bitmap.
->where does the info regarding a layer is being parsed and created( I know
it is webcore but where is it linked with webprocess)
3) What does a backing store , layer tree do?
->Is like backing store is where the sharable bitmap is created which is
being passed onto uiprocess and layer tree stores info of each layer which
then is being composited?
4) What are the important places i need to take care(in code) like eg.
PageClient,DrawingAreaCoordinatedGraphics etc.
->I actually found my drawing area couldnt start drawing because the
drawing area size was empty so I may have missed lot of implementation
details it would help if you guys could point me to
required places that are required.

Thank you for the time :)

Regards,
G.Rajagopalan
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Help regarding rendering in webkit2 port of haiku

2019-06-10 Thread Rajagopalan Gangadharan
>btw I might be able to help out (no promises), I haven't touched WebKit
code in a few years but I was responsible for TextureMapper and the
coordinated graphics system and I like bizarre >projects (a Haiku port
sounds like one). Let's see how it goes :)

Sure thank you for very great insite will look into to it and get back :)

Regards
G.Rajagoapalan

On Mon, Jun 10, 2019 at 12:07 PM Noam Rosenthal  wrote:

> ~ (reposting from webkit email)
>
> Hello!
> I suggest starting by learning one of the other ports - like GTK - how the
> whole flow works from the windowing system to WebCore to the graphics
> system. Read the code, run it in debug mode and put breakpoints, get those
> aha moments of how it all works together.
>
> Note that coordinated graphics is not automatically the right choice for
> every port - it was created for mobile windowing systems where window
> context-switching was expensive and single-context hardware acceleration
> was cheap. If you're looking for a guide check out
> https://trac.webkit.org/wiki/CoordinatedGraphicsSystem, hopefully it's
> still somewhat valid. I would start there by understanding the flow and how
> it fits with the Haiku architecture, seems like you've started doing that
> already. you're on the right track there.
>
> btw I might be able to help out (no promises), I haven't touched WebKit
> code in a few years but I was responsible for TextureMapper and the
> coordinated graphics system and I like bizarre projects (a Haiku port
> sounds like one). Let's see how it goes :)
>
>
> On Mon, Jun 10, 2019 at 9:05 AM Rajagopalan Gangadharan <
> g.raju2...@gmail.com> wrote:
>
>> Hello everybody,
>>
>> A quick look back on what we have done so far. We are trying to port
>> webkit2 to haiku and we have a working IPC with us. So the next step i
>> presume is to be rendering.
>>
>> I did few amount of research and have few basic ideas. Correct me if I am
>> wrong.
>>
>> 1) The rendering takes place in webprocess over a shared bitmap which is
>> then rendered onto the client area in UIProcess.
>>
>> 2) Webkit uses coordinated graphics system which relies on OPENGL.
>>
>> So we look forward to get the rendering step done or is there anything we
>> should take care in between? .
>> Our platform doesnt have hardware accelerated OpenGL yet we have software
>> implementation vesa which we tend not to use.
>> We have a working texture mapper and compositing coordinator from our
>> webkit legacy port. I think this makes up the entire compositing
>> coordinator.
>>
>> So it would be of great help if any tells how could we proceed like what
>> should be our next move. Perhaps a small guide would be better.
>>
>> Thank you
>>
>> Regards
>> G.Rajagopalan
>> ___
>> webkit-dev mailing list
>> webkit-dev@lists.webkit.org
>> https://lists.webkit.org/mailman/listinfo/webkit-dev
>>
>
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Help regarding rendering in webkit2 port of haiku

2019-06-09 Thread Rajagopalan Gangadharan
Hello everybody,

A quick look back on what we have done so far. We are trying to port
webkit2 to haiku and we have a working IPC with us. So the next step i
presume is to be rendering.

I did few amount of research and have few basic ideas. Correct me if I am
wrong.

1) The rendering takes place in webprocess over a shared bitmap which is
then rendered onto the client area in UIProcess.

2) Webkit uses coordinated graphics system which relies on OPENGL.

So we look forward to get the rendering step done or is there anything we
should take care in between? .
Our platform doesnt have hardware accelerated OpenGL yet we have software
implementation vesa which we tend not to use.
We have a working texture mapper and compositing coordinator from our
webkit legacy port. I think this makes up the entire compositing
coordinator.

So it would be of great help if any tells how could we proceed like what
should be our next move. Perhaps a small guide would be better.

Thank you

Regards
G.Rajagopalan
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] IPC implementation help in haiku's webkit port

2019-05-29 Thread Rajagopalan Gangadharan
Thank you for the response guys. It was really wise advice we indeed
realized that we should not rely on run loop for communicating with other
process. So we have come with a solution to bypass the mainloop. :)

Regards
G. Rajagopalan
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] IPC implementation help in haiku's webkit port

2019-05-27 Thread Rajagopalan Gangadharan
Hello Everybody,

I stumbled upon a problem in an attempt to port webkit to haiku. Before
everything I would like to take few moments to explain about state of the
port.

1) We have a well maintained WebKitLegacy port on haiku.
2) Now in the process of porting latest webkit to haiku currently at fixing
IPC. We didnt want to use BSD sockets and would like to use Native
messaging framework [BMessage :
https://www.haiku-os.org/docs/api/classBMessage.html ] because our native
application waits for BMessage in its main thread as a result we cant wait
for both sockets and BMessage on same thread. Also we would like to
maintain the haiku ecosystem :) .

3) We need process id of the intended process we would like to connect to
send data [BMessenger:
https://www.haiku-os.org/docs/api/classBMessenger.html ] So instead of
exchanging socket id's we would just exchange pid's

4) We were able to successfully deliver and process the messages. Currently
we were able to proceed until creating a connection between network process
and webprocess(NetworkConnectionToWebProcess).

Now where we are stuck is that After creating a connection between network
process and webprocess we would have to reply back to webprocess about the
connection info( pid of network process in our case ). I see the reply is
an alias of DelayedReply(CompletionHandler) according to the
derived sources.
Unfortunately the webprocess is indefinitely waiting for reply from
webprocessproxy for which we are unable to "reply" .

Could anyone point me where I would have went wrong or what could be done
to fix this and any better ways for implementing this.

Please check the source references for more info:
NetworkProcessProxy: [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/blob/6bf81d79669be06b4efd9d8ced4139cbe07216b2/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp#L150
]

NetworkProcess [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/blob/6bf81d79669be06b4efd9d8ced4139cbe07216b2/Source/WebKit/NetworkProcess/haiku/NetworkProcessHaiku.cpp#L98
]

ConnectionHaiku : [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/blob/ipc-iteration2/Source/WebKit/Platform/IPC/haiku/ConnectionHaiku.cpp
 ]

Attachment : [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/blob/ipc-iteration2/Source/WebKit/Platform/IPC/haiku/AttachmentHaiku.cpp
 ]
I believe these places are currently in focus
For further reference please check [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/tree/ipc-iteration2]

Thank you
Regards
G.Rajagopalan
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Queries regarding few Components in webkit

2019-04-02 Thread Rajagopalan Gangadharan
Hello everybody,
I have some more queries as im trying to port webkit2 to haiku.

How do I set up the drawing area for webkit to render its stuff ( the
functions that render in drawingareaproxy, webpageproxy..etc)

Thank you
Regards
Rajagopalan
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Queries regarding few Components in webkit

2019-03-17 Thread Rajagopalan Gangadharan
This is great, thank you so much!

On Sun, Mar 17, 2019 at 8:59 PM Adrian Perez de Castro 
wrote:

> Hello,
>
> On Sun, 17 Mar 2019 09:08:10 -0500, Michael Catanzaro <
> mcatanz...@igalia.com> wrote:
>
> > It might be more realistic to try making an existing WebKit port work
> > on Haiku (either WebKitGTK or WPE WebKit) rather than try to create an
> > entirely new port.
>
> You are forgetting that there is an existing, well-maintained WebKit1
> port for Haiku. *That* should be the basis for a port to WebKit2. The
> repository is available at:
>
>   https://github.com/haiku/webkit
>
> As a matter of fact, according to the README in that repository, there
> is already some ongoing effort to support WebKit2 in the Haiku port. You
> should look into that instead of potentially wasting time redoing work
> that has already been done by others.
>
> > Previously you indicated that you were planning to create a new network
> > backend for Haiku; that alone would be enough to occupy a developer
> > full-time for a long while and doesn't seem very realistic. But that's
> > just one small portion of developing and maintaining an entire WebKit
> > port. Taking an existing port and making it run on Haiku would be much
> > easier.
>
> Haiku has its own “libnetapi” system library, so IMO the goal should be
> making WebKit use it (if it doesn't already — note that I am not familiar
> with the insides of the Haiku WebKit port). You can see it in the upstream
> repository here:
>
>   https://git.haiku-os.org/haiku/tree/src/kits/network/libnetapi
>
> Its API documentation is available here:
>
>   https://www.haiku-os.org/docs/api/group__network.html
>
> If using this is impossible, hard, or would need a lot of work in Haiku's
> network library, then I would suggest using WebKit's libcurl network
> backend
> to have something working at first (because the code it's already in the
> WebKit repository and is known to work), and *then* once you have the rest
> of the WebKit2 port running, look into switching from libcurl to Haiku's
> built-in network library.
>
> > On Sun, Mar 17, 2019 at 7:38 AM, Rajagopalan Gangadharan
> >  wrote:
> > > What is a WKRetainPtr ? where can I use it?
> >
> > It's a smart pointer for holding ownership of C API types, which you
> > shouldn't be using. The C API is not stable and is slowly being
> > retired. If you really don't want to use WebKitGTK or WPE WebKit, then
> > you should create your own separate public API based on WebKit
> > internals, not based on the C API. If you use the C API, your port will
> > be difficult to maintain in the long run.
>
> Agreed. Your public API should use Haiku types and existing conventions.
> A good first step would be to check the exiting API for Haiku's WebKit1
> port (see above, I linked the repository), keep the parts that still make
> sense in a WebKit2 world, and add and modify others as necessary.
>
> You can get more inspiration for API design from:
>
>  - The Haiku documentation itself: https://www.haiku-os.org/docs/api/
>  - The public APIs for existing WebKit2 ports:
> * The GTK/WPE ports (both have a rather similar GLib-based API):
>   https://webkitgtk.org/reference/webkit2gtk/stable/index.html
> * The Qt port (the code for it is also in its own repo):
>   https://github.com/annulen/webkit
> * The Cocoa ports (which has both Objective-C and Swift APIs):
>   https://developer.apple.com/documentation/webkit
>
> > > What is WKContext and WKView (I think Webview is different from
> > > WKView) -> as far my understanding is Context like the context menu
> > > an os offers (ie right clicking provides copy,paste etc.)
> >
> > No, it's a library context object (corresponding to WebProcessPool). If
> > you have two web contexts, you effectively have two separate instances
> > of WebKit (e.g. separate NetworkProcess, separate data storage
> > directories, separate everything) to avoid shared global state.
> >
> > > and View is where rendering takes place?
> >
> > This is correct.
> >
> > Good luck,
>
> I also wish you a fun time hacking on WebKit, but *please* do make sure to
> contact the Haiku developers and coordinate with them to avoid duplicating
> efforts. Making a new WebKit port is a big task, and you will certainly
> have
> much better chances of succeeding by making the most of existing work and
> having the support of developers with knowledge of the target platform.
>
> Regards,
>
>
> -Adrián
>
> P.S: I am a bit of a BeOS fan myself, unfortunately I haven't used daily
> for a
> long time, and never developed anything for the platform. I would love to
> see
> Haiku have a working WebKit2 port for the platform!
>
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Queries regarding few Components in webkit

2019-03-17 Thread Rajagopalan Gangadharan
Hello guys,
I am trying to use Webkit for Haiku(trying to create a minibrowser)
I have few quick questions.
1) What is a WKRetainPtr ? where can I use it?
2) What is WKContext and WKView (I think Webview is different from WKView) -> 
as far my understanding is Context like the context menu an os offers (ie right 
clicking provides copy,paste etc.) and View is where rendering takes place?
Thank you guys!

Regards,
G.Rajagopalan

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Encoding and decoding ProcessID

2019-02-26 Thread Rajagopalan Gangadharan
WTF::ProcessID and WKProcessID are supposed to be of same type right? As 
different types create ambiguity . As sam Weining suggested we made 
WTF::ProcessID to be int32_t but WKProcessID is pid_t so can we also explicitly 
make WKProcessID to be int32_t (will it conform to the current webkit model? 
)or is there any way I could fix this( any implicit casting )

Regards,
G.Rajagopalan

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Regarding problem in building webkit2

2019-02-25 Thread Rajagopalan Gangadharan
Hello, 
I am trying to build webkit for haiku and I stumbled upon an error
The error is in “Source\WebKit\UIProcess\WebsiteData\WebsiteDataStore.cpp” line 
2080 says about missing platformSetNetworkParameters function and I saw it was 
defined for CURL and SOUP only. Should I use the function defined under them or 
should I write it to be haiku specific(platform specific) if so what should be 
the contents of it. Thank you!

Regards,
G.Rajagopalan

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev