diff --git a/src/servers/app/ViewLayer.cpp b/src/servers/app/ViewLayer.cpp index 229a4aa5df..b07729f739 100644 --- a/src/servers/app/ViewLayer.cpp +++ b/src/servers/app/ViewLayer.cpp @@ -16,6 +16,7 @@ #include "DrawingEngine.h" #include "ServerApp.h" #include "ServerBitmap.h" +#include "ServerPicture.h" #include "ServerWindow.h" #include "WindowLayer.h" @@ -59,6 +60,8 @@ ViewLayer::ViewLayer(BRect frame, const char* name, fPreviousSibling(NULL), fNextSibling(NULL), fLastChild(NULL), + + fPicture(NULL), fLocalClipping(Bounds()), fScreenClipping(), @@ -81,6 +84,8 @@ ViewLayer::~ViewLayer() delete fDrawState; + // TODO: Don't know yet if we should also delete fPicture + // iterate over children and delete each one ViewLayer* layer = fFirstChild; while (layer) { @@ -867,6 +872,20 @@ ViewLayer::SetEventMask(uint32 eventMask, uint32 options) } +void +ViewLayer::SetPicture(ServerPicture *picture) +{ + fPicture = picture; +} + + +ServerPicture * +ViewLayer::Picture() const +{ + return fPicture; +} + + void ViewLayer::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping, BRegion* windowContentClipping, bool deep) diff --git a/src/servers/app/ViewLayer.h b/src/servers/app/ViewLayer.h index b1077a87bf..15524facec 100644 --- a/src/servers/app/ViewLayer.h +++ b/src/servers/app/ViewLayer.h @@ -23,7 +23,7 @@ class DrawState; class DrawingEngine; class WindowLayer; class ServerBitmap; - +class ServerPicture; class ViewLayer { public: @@ -147,6 +147,9 @@ class ViewLayer { uint32 EventOptions() const { return fEventOptions; } + void SetPicture(ServerPicture *picture); + ServerPicture *Picture() const; + // for background clearing virtual void Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping, @@ -214,6 +217,7 @@ class ViewLayer { ViewLayer* fNextSibling; ViewLayer* fLastChild; + ServerPicture *fPicture; // clipping BRegion fLocalClipping;