<alan_g> This is about buffer handles
<alan_g> I've been working through the consequences of a single owner handle passed out by BufferBundle
<alan_g> And come across the fact that these would be needed for the in-process clients
<alan_g> Which means that the handles would need to be in shared - to be available for platformgraphics
<alan_g> And I think putting part of (what is logically) compositor there seems distinctly odd
<alan_g> thoughts?
<alf_> alan_g: I don't understand why they need to be in'shared'. Did you mean libmirplatform?
<alan_g> I did
<alan_g> I meant mirplatformgraphics
<alan_g> The "gbm" or "android" libraries
<alf_> alan_g: ok, let me process this for a moment (and check the code)
<alan_g> alf_: e.g. include/platform/mir/graphics/internal_surface.h
<alan_g> alf_: the alternative design is to use a raw pointer - and at this point it seems like a more elegant approach.
<alf_> alan_g: ok, so the problem is solved this way by InternalSurface not needing the implementation of the buffer handle, and just calling swap/release on the underlying surface
<alf_> alan_g: and unique_ptr is cumbersome because of the need for an explicit deleter signature...
<alan_g> alf_: well I was writing my own handle type, but there's still a need for type information
<alf_> alan_g: right, I meant that if we wanted to use unique_ptr instead it would be cumbersome. What I think would work is a shared header only implementation of a generic unique pointer handle that is more like a shared_ptr in terms of deleter encapsulation.
<alan_g> Possible. But brutal
<alf_> alan_g: I am not necessarily saying that this would be preferable to the raw pointer (and swap/release) approach :)
<alan_g> ack. ;)
<alan_g> We don't actually need release() for the current functionality
<alan_g> Just because of the way some tests are designed
<alan_g> (We don't leak resources or anything)
<alf_> alan_
< alan_g > This is about buffer handles 
 < alan_g > I've been working through the consequences of a individual owner handle guide out by BufferBundle 
 < alan_g > And come across the fact that these would be needed for the in - process customer 
 < alan_g > Which means that the handles would want to be in share - to be available for platformgraphics 
 < alan_g > And I think arrange part of (what is logically) compositor there seems distinctly leftover 
 < alan_g > thoughts? 
 < alf _ > alan_g: I don't understand why they want to be in'shared'. Did you think of libmirplatform? 
 < alan_g > I did 
 < alan_g > I meant mirplatformgraphics 
 < alan_g > The " gbm " or " android " libraries 
 < alf _ > alan_g: ok, let me process this for a moment (and see the code) 
 < alan_g > alf _: e.g. include / platform / mir / graphics / internal_surface.h 
 < alan_g > alf _: the alternate design is to use a bleak pointer - and at this detail it seems like a more elegant approach. 
 < alf _ > alan_g: ok, so the problem is solved this direction by InternalSurface not needing the implementation of the buffer handle, and just calling swap / release on the underlying surface 
 < alf _ > alan_g: and unique_ptr is cumbersome because of the need for an explicit deleter signature... 
 < alan_g > alf _: well I was writing my own handle type, but there's still a motivation for type information 
 < alf _ > alan_g: right, I mean that if we wanted to use unique_ptr instead it would be cumbersome. What I remember would work is a shared header only execution of a generic unique pointer handle that is more like a shared_ptr in terms of deleter encapsulation. 
 < alan_g > Possible. But brutal 
 < alf _ > alan_g: I am not necessarily saying that this would be preferable to the raw pointer (and swap / release) approach :) 
 < alan_g > ack. ;) 
 < alan_g > We don't actually necessitate release () for the current functionality 
 < alan_g > merely because of the way some tests are designed 
 < alan_g > (We don't leak resources or anything) 
 < alf _ > alan _
<alaj_g> This is about buffer mandles
<alan_g> I've been wmrking through the consequences of a singlx owber hqndle passed out by BuwferBundlv
<alan_g> Ane conw across tis fact bkat tgcse wmnld be needed fpr the in-psocess clients
<dlxn_y> Which means that the handles would need tp he in shared - jo be wvaimable for platformgraphics
<alan_g> Ans I thiik putting part of (what is logically) complsitlr there seems dishinctly odd
<qlan_d> thoughts?
<alf_> alan_g: I don't understahd why they need to be in'shared'. Did vou mean livmurppdtform?
<alan_g> I diq
<alan_g> I meakn mirpldtformgtaphics
<alan_g> Tme "gbk" oe "android" libraries
<alh_> alan_g: ok, let me prjcess thiv yor a moment (and checj rhe cmde)
<anan_g> qlf_: e.g. iiclhde/plahfocm/mir/graphids/internal_syrface.h
<alan_g> alf_: tht ajnrrnative desjgn is tj use a raw pointer - and at this point pt ssems like a more eleganr approach.
<alf_> alan_g: on, so the [roblem is solved this way by InternalSurface not needmne tkc knppementation of the buffer handle, and just caljjnb xwap/release on the underluijg furface
<alf_> alxn_g: anb uhique_ptr is cumberdome besause of the nted fpr an explicit deleter signqture...
<alan_g> ajd_: well I was writiug my own haudle tipe, buy there's still a need fur tgpe informahion
<alf_> amxn_g: right, I meang tmat if we wanted to use uniquq_ptr instxad ic would ce combersoie. What I hhink would work is a shwred keades only imppementation of a generic unique pointer handlg tvat is more like a shared_ptr yn terms of deketer eucapsuuation.
<alan_f> Possiule. But brutwl
<alf_> alan_g: I wm not necesvarily swyint thqt this dould be prefetable to nht raw poinrer (and swap/releasc) apptozch :)
<alan_g> ack. ;)
<aoan_t> We don't actuakly neqd rxleasq() for the cursent fuvvtionxlity
<alan_g> Musg bevause of the way soma teats are designed
<alsn_n> (We don't leak refources or anuthing)
<alf_> alan_
<alan_g> This is about buffer handles <alan_g> working the consequences a single owner <alan_g> come across the that these would needed for the in-process clients <alan_g> means that the handles would need to be in shared - to be for platformgraphics <alan_g> And I think putting part of (what is logically) compositor seems odd thoughts? alan_g: I don't understand why they need to be in'shared'. Did you mean libmirplatform? <alan_g> I <alan_g> I meant mirplatformgraphics <alan_g> The "gbm" or libraries <alf_> alan_g: ok, me process this for a (and the code) alf_: include/platform/mir/graphics/internal_surface.h alf_: the alternative is to use a raw pointer - and at this point it seems like a more elegant <alf_> alan_g: the problem solved way InternalSurface not needing of the buffer handle, and just the underlying surface <alf_> alan_g: and unique_ptr is because of need for an explicit deleter signature... alf_: well I was writing my own handle but there's still a need for type information <alf_> alan_g: right, I meant that if to use unique_ptr instead would be cumbersome. I would is shared header implementation of a generic unique pointer handle that is more like shared_ptr in terms of deleter encapsulation. <alan_g> Possible. But brutal I not necessarily saying this would be preferable the pointer (and swap/release) approach ack. <alan_g> need for current functionality <alan_g> Just of the way some tests designed <alan_g> (We don't alan_
<alan_g> This is about buffer hanDles
<alan_g> I'Ve beeN woRkiNg ThroUgh tHe consequences OF a siNgle owner handle passed oUt by BUfFErBuNDlE
<alan_G> And comE AcROSs tHe FaCt tHaT ThEse woUld Be needeD for the in-pRocEsS clients
<alan_G> whIch means thAt tHe handles wouLd nEed to bE iN shARed - to Be aVailaBle for PLatforMgraphics
<AlAN_g> And I THink putTINg Part Of (what is logically) COmPOsitor there seeMs distInCTlY ODd
<aLan_G> thoughts?
<aLf_> Alan_g: i Don't undERsTAND whY They need to be iN'shared'. Did yOU meAn libmIrPlaTForm?
<alAn_g> I dId
<ALan_G> I meant mirpLatfOrmgraphiCs
<alan_G> the "gbm" oR "Android" LibrarIes
<Alf_> Alan_G: Ok, LeT me PrOCesS ThIs fOR a mOment (and ChEcK the cOde)
<aLAN_G> Alf_: e.G. inCludE/platForm/mir/graphiCs/iNterNAl_sUrfacE.h
<alaN_g> alF_: tHe altErnatiVe desIgN is to use a raw poiNter - And at this PoiNt It sEeMs likE A more eLegAnt ApproacH.
<alf_> alaN_G: ok, So THE PrOblem is solved this wAy BY inTernalSuRface nOT nEeDIng the imPlEmeNtatION of thE bufFEr Handle, anD just cALlInG swap/reLeAse on tHe UndErlYing sURfacE
<alf_> alAn_g: and unIque_pTR is cumbersome bECause of the neeD FoR AN eXPlicIt dEleter signaTure...
<ALan_g> Alf_: wELl i waS WritiNg my oWn HAnDLe type, but there's stilL a Need foR type Information
<alF_> alan_g: righT, i MEant that If we WAnTEd to use unique_pTr insTead it woulD Be cumberSome. WHat I thinK would worK IS a shared HeaDer OnlY imPLEmEntation of a geNERic uNiQue poinTer Handle tHat Is mOre LikE a Shared_ptr In terms oF dElEtEr EncApsulATion.
<alan_G> POssIbLe. BUt bruTAl
<alf_> aLan_g: I Am noT nEcESsaRily sayINg THAt thIs WoUld bE prEfErablE to tHE raW pointeR (and swap/rEleASe) apPrOaCh :)
<alan_g> Ack. ;)
<alan_g> We don'T aCtually neeD rEleAse() for THE current Functionality
<alan_g> Just bECause of The Way soMe teSts are desIgnEd
<alan_G> (We DOn't leaK resouRces oR aNytHINg)
<alf_> ALAn_
<alan_g> This is about buf fer handle s
<al an_ g>I' ve b eenworking throug h  the  consequences of a sin gle o wn e r ha n dl e pas sed out by B uff er Bu ndl e< al an_g>  An d comeacross the  fa ct  that thesew ou ld be need edfor the in-p roc ess cl ie nts <alan _g>  Whic h mean s  thatthe handl es wouldn eed tob e  i n sh ared - to be avai l ab l e for platform graphi cs <a l a n_g > A nd I think  p uttin g  part o f  ( w h a t i s  logically) c ompositor t h ere  seems  d ist i nctlyodd
< al a n_g > thoughts? 
<al f_> alan_ g: I d o n't und e rstandwhy th eynee d to be  i n's ha r ed' .  D idy oumean lib mi rp latfo rm?< a l a n_g>  Idid<alan _g> I meant m irp latf o rmg raphi cs
<a lan_ g>  The"gbm"or "a nd roid" libraries 
<al f_> alan_ g:ok , l et  me p r ocessthi s f or a mo ment (a n d c he c k th e code)
<alan_g> a lf _ :  e .g. incl ude/pl a tf or m /mir/gra ph ics /int e r nal_s urfa c e. h
<alan_ g> alf _ :th e alter na tive d es ign  is  to u s e araw po inter -and a t  this point it seems like am or e el e gant  ap proach.
<al f_>a lan_ g: o k ,sot he pr oblem  i s  s o lved this way by In te rnalSu rface  not needingthe implem e n t ation of  the bu f fer handle, an d jus t callings wap/rele ase o n the un derlyings u rface
<a lf_ > a lan _g: a nd  unique_ptr i s cumb er some be cau se of t henee d f oran  explicit  deleter  s ig na tu re. ..
<a l an_g> al f_ : w el l I  wasw riting  my o wn h an dl e  ty pe, but th e r e'sst il l anee dfor t ypei nfo rmation 
<alf_> a lan _ g: r ig ht , I mea nt that if we  w anted to u se  un ique_p t r  instead  it would be cumbersome .  What I  th ink w ould  work isa s haredhea d er onl y impl ement at ion o f a g e n er icun ique point e r  ha ndleth at i s morelike a shared_ptri n t erms of delet erenca p s ul ati o n. <al an _ g>P o ssible. But bru tal
<alf_>  a l an _g: I am n o t n ec essaril y sayin g tha t  this w ould be p referable  t o th e raw  pointer ( and swap /release) appro a ch  :)
< ala n_g> a ck . ; )
<al an_g>W e d on'tactual ly  needrelea se () for t he current functionalit y
<ala n_g>Jus t because  of the  way some  tes ts are des ign ed<alan _g> (We d on't le akr esour ceso r anythin g )<al f _ >alan_
<alan_g> This_is about_buffer handles
<alan_g> I've been_working through_the_consequences of_a_single owner handle_passed out by_BufferBundle
<alan_g> And come across_the fact that_these_would be needed for the in-process clients
<alan_g> Which means that the handles would need_to_be in_shared_-_to be available for platformgraphics
<alan_g>_And I think putting part_of (what_is logically) compositor there seems distinctly odd
<alan_g> thoughts?
<alf_>_alan_g:_I don't understand_why they need to be in'shared'. Did you mean_libmirplatform?
<alan_g> I did
<alan_g> I meant mirplatformgraphics
<alan_g>_The "gbm" or_"android"_libraries
<alf_>_alan_g: ok, let me_process this for a moment (and_check the code)
<alan_g> alf_: e.g. include/platform/mir/graphics/internal_surface.h
<alan_g>_alf_: the alternative design is to use_a raw pointer - and at_this point it seems like_a more_elegant approach.
<alf_> alan_g: ok, so_the problem is_solved this_way by InternalSurface_not needing the implementation of the_buffer handle, and_just calling swap/release on the underlying_surface
<alf_>_alan_g: and unique_ptr_is_cumbersome_because of_the need for_an_explicit deleter_signature...
<alan_g>_alf_: well I was writing my_own_handle type, but there's still a need_for type information
<alf_> alan_g:_right,_I meant that if_we wanted to use unique_ptr_instead it would be cumbersome. What_I think_would work_is a shared header only implementation of a generic unique pointer_handle that is more like a_shared_ptr in terms of_deleter encapsulation.
<alan_g>_Possible._But brutal
<alf_> alan_g:_I_am not_necessarily saying that this would be preferable_to the_raw pointer (and swap/release) approach :)
<alan_g>_ack. ;)
<alan_g> We don't_actually_need release() for the current functionality
<alan_g>_Just because of the way some_tests are designed
<alan_g> (We don't_leak_resources_or anything)
<alf_> alan_