[haiku-appserver] primitive drawing, bitmap issue

  • From: "Adi Oanca" <adioanca@xxxxxxxxx>
  • To: "AS Team" <haiku-appserver@xxxxxxxxxxxxx>
  • Date: Mon, 26 Jul 2004 17:11:36 +0300

   [ back from vacantion! :-(((( ]
   [sorry for not wrapping] Web-based mail for this address, while at work.
   ATM our app_server links against libbe.so. What if we include the
   rendering code inside this library and use it on server side, as well as
   on client side.
   Let me explain. All that the rendering code needs is a surface.
   This surface may be a**the screena** or a bitmap.
   If we wish to draw in a window(on-screen) then, that drawing will be made
   by ServerWindow's thread.
   If, we wish to draw in a bitmap, then we would instantiate a Drawer object
   and use BWindow's/BApplication's thread to draw what we need.
   Remote drawing is specified in Drawer's constructor. When that happens,
   the respective drawing_instruction's parameters would be sent to
   app_server and taken over by one RootLayer's Drawer object.
   This approach I think is useful because it avoids context switching by
   calling kernel functions and creating 2 threads as R5 does.
   Also, there another 2 big advantages that will be useful in the near
   future. 1) it prepares the ground for double buffering (with little
   hacking we could have this for R1 too :-D ), and 2) we can make use of
   hardware acceleration when available.
   Think like this(in near future): there are multiple pipelines in 3D
   hardware for years now; there are this amazing features called pixel
   shaders, all which can help drawing operations perform faster and a few at
   a time. Object Drawer1 should always be used(and reserved to) by RootLayer
   class while the remaining pipelines would be used on client-side by other
   Drawers to draw into bitmaps(which are in videoMem). If we run out of
   pipelines, other Drawers would be instantiated, but this time the
   CPU+mainMem would do all the work.
   Well, tell me what you think.

Credite pentru Dacia Logan - Bloombiz.ro

Other related posts: