comparison engine/core/view/renderers/blockinginforenderer.cpp @ 482:16c2b3ee59ce

* Merged the view performance branch back into trunk. fixes[ticket:419]
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 29 Apr 2010 13:51:45 +0000
parents 9d94f4676d17
children b2feacaed53c
comparison
equal deleted inserted replaced
481:1f37adc9a685 482:16c2b3ee59ce
56 } 56 }
57 57
58 BlockingInfoRenderer::~BlockingInfoRenderer() { 58 BlockingInfoRenderer::~BlockingInfoRenderer() {
59 } 59 }
60 60
61 void BlockingInfoRenderer::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances) { 61 void BlockingInfoRenderer::render(Camera* cam, Layer* layer, RenderList& instances) {
62 CellGrid* cg = layer->getCellGrid(); 62 CellGrid* cg = layer->getCellGrid();
63 if (!cg) { 63 if (!cg) {
64 FL_WARN(_log, "No cellgrid assigned to layer, cannot draw grid"); 64 FL_WARN(_log, "No cellgrid assigned to layer, cannot draw grid");
65 return; 65 return;
66 } 66 }
67 67
68 Rect cv = cam->getViewPort(); 68 Rect cv = cam->getViewPort();
69 std::vector<Instance*>::const_iterator instance_it = instances.begin(); 69 RenderList::const_iterator instance_it = instances.begin();
70 for (;instance_it != instances.end(); ++instance_it) { 70 for (;instance_it != instances.end(); ++instance_it) {
71 Instance* instance = *instance_it; 71 Instance* instance = (*instance_it)->instance;
72 if (!instance->getObject()->isBlocking()) { 72 if (!instance->getObject()->isBlocking()) {
73 continue; 73 continue;
74 } 74 }
75 std::vector<ExactModelCoordinate> vertices; 75 std::vector<ExactModelCoordinate> vertices;
76 cg->getVertices(vertices, instance->getLocationRef().getLayerCoordinates()); 76 cg->getVertices(vertices, instance->getLocationRef().getLayerCoordinates());