~3v1n0/nux/check-dnd_area-trusty

« back to all changes in this revision

Viewing changes to NuxGraphics/GraphicsEngine.h

  • Committer: Tarmac
  • Author(s): Sam Spilsbury, Marco Trevisan (Treviño), Chris Townsend
  • Date: 2013-11-05 20:23:53 UTC
  • mfrom: (791.2.28 nux)
  • Revision ID: tarmac-20131105202353-58aojyevtnonqavv
Allow embedded clients to specify which windows should be redrawn.

Added some new API to nux to allow embedded clients (eg, compiz) to specify which BaseWindows should be redrawn on a frame. This is done by passing a list of rectangles to nux which represent the redraw region, and nux will mark all intersecting windows as needing re-presenting to the screen. This means that we aren't re-presenting every window to the screen on every frame (bad for performance, and also doesn't work correctly in the buffer-swap case).

Also added API to allow nux to tell the difference between draw and read framebuffers when it plays around with the framebuffer object binding. This is necessary in case the embedded client expects the read framebuffer binding to remain defined even after nux has changed the draw framebuffer binding.

(LP: #1091589). Fixes: https://bugs.launchpad.net/bugs/1091589.

Approved by PS Jenkins bot, Stephen M. Webb, Brandon Schaefer, Christopher Townsend.

Show diffs side-by-side

added added

removed removed

Lines of Context:
533
533
    //////////////////////
534
534
 
535
535
    mutable std::vector<Rect> ClippingRect;
536
 
    void PushClippingRectangle(Rect rect);
 
536
    void PushClippingRectangle(Rect const& rect);
537
537
    void PopClippingRectangle();
538
538
    void EmptyClippingRegion();
539
539
    //! Set the clipping according to the clipping rectangle stack.
540
540
    void ApplyClippingRectangle();
541
 
    
542
 
    void SetGlobalClippingRectangle(Rect rect);
 
541
 
 
542
    void SetGlobalClippingRectangle(Rect const& rect);
543
543
    void DisableGlobalClippingRectangle();
544
544
 
545
545
    //! Bypass the clipping rectangle stack and set a different clipping rectangle region.
553
553
 
554
554
    Rect GetClippingRegion() const;
555
555
    int GetNumberOfClippingRegions() const;
556
 
    
 
556
 
557
557
    void AddClipOffset(int x, int y);  //!< Deprecated. Use PushClipOffset.
558
558
    void PushClipOffset(int x, int y);
559
559
    void PopClipOffset();
592
592
    */
593
593
    void SetScissorOffset(int x, int y);
594
594
 
595
 
    Rect GetScissorRect();
 
595
    Rect const& GetScissorRect() const;
596
596
    void EnableScissoring(bool b);
597
597
 
598
598