To allow testing the ViewHWInterface (used in the test environment) with
both double buffering and single buffering, Invalidate() needs to be virtual and ViewHWInterface needs to decide where to invalidate it's host window. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28480 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3cbd4a09f7
commit
6198dc0e17
@ -143,7 +143,7 @@ class HWInterface : protected MultiLocker {
|
||||
virtual bool IsDoubleBuffered() const;
|
||||
|
||||
// Invalidate is used for scheduling an area for updating
|
||||
status_t Invalidate(const BRect& frame);
|
||||
virtual status_t Invalidate(const BRect& frame);
|
||||
// while as CopyBackToFront() actually performs the operation
|
||||
// either directly or asynchronously by the UpdateQueue thread
|
||||
virtual status_t CopyBackToFront(const BRect& frame);
|
||||
|
@ -758,6 +758,17 @@ ViewHWInterface::IsDoubleBuffered() const
|
||||
return HWInterface::IsDoubleBuffered();
|
||||
}
|
||||
|
||||
// Invalidate
|
||||
status_t
|
||||
ViewHWInterface::Invalidate(const BRect& frame)
|
||||
{
|
||||
status_t ret = HWInterface::Invalidate(frame);
|
||||
|
||||
if (ret >= B_OK && fWindow && !IsDoubleBuffered())
|
||||
fWindow->Invalidate(frame);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// CopyBackToFront
|
||||
status_t
|
||||
ViewHWInterface::CopyBackToFront(const BRect& frame)
|
||||
|
@ -53,6 +53,7 @@ class ViewHWInterface : public HWInterface {
|
||||
virtual RenderingBuffer* BackBuffer() const;
|
||||
virtual bool IsDoubleBuffered() const;
|
||||
|
||||
virtual status_t Invalidate(const BRect& frame);
|
||||
virtual status_t CopyBackToFront(const BRect& frame);
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user