Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/Internals/CompositorHelper.h @ 1211:d10d2acb8a02 broker
compositors do not keep a reference to the scene anymore
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 04 Dec 2019 16:47:21 +0100 |
parents | e4ac54cb8771 |
children | 0ca50d275b9a |
comparison
equal
deleted
inserted
replaced
1210:644baa70373d | 1211:d10d2acb8a02 |
---|---|
62 private: | 62 private: |
63 class Item; | 63 class Item; |
64 | 64 |
65 typedef std::map<int, Item*> Content; | 65 typedef std::map<int, Item*> Content; |
66 | 66 |
67 const Scene2D& scene_; | |
68 IRendererFactory& factory_; | 67 IRendererFactory& factory_; |
69 Content content_; | 68 Content content_; |
69 const Scene2D* lastScene_; // This is only a safeguard, don't use it! | |
70 | 70 |
71 // Only valid during a call to Refresh() | 71 // Only valid during a call to Refresh() |
72 AffineTransform2D sceneTransform_; | 72 AffineTransform2D sceneTransform_; |
73 unsigned int canvasWidth_; | 73 unsigned int canvasWidth_; |
74 unsigned int canvasHeight_; | 74 unsigned int canvasHeight_; |
75 | 75 |
76 protected: | 76 protected: |
77 virtual void Visit(const ISceneLayer& layer, | 77 virtual void Visit(const Scene2D& scene, |
78 const ISceneLayer& layer, | |
78 uint64_t layerIdentifier, | 79 uint64_t layerIdentifier, |
79 int depth); | 80 int depth); |
80 | 81 |
81 public: | 82 public: |
82 CompositorHelper(const Scene2D& scene, | 83 CompositorHelper(IRendererFactory& factory) : |
83 IRendererFactory& factory) : | 84 factory_(factory), |
84 scene_(scene), | 85 lastScene_(NULL) |
85 factory_(factory) | |
86 { | 86 { |
87 } | 87 } |
88 | 88 |
89 ~CompositorHelper(); | 89 ~CompositorHelper(); |
90 | 90 |
91 void Refresh(unsigned int canvasWidth, | 91 void Refresh(const Scene2D& scene, |
92 unsigned int canvasWidth, | |
92 unsigned int canvasHeight); | 93 unsigned int canvasHeight); |
93 }; | 94 }; |
94 } | 95 } |
95 } | 96 } |