[Libreoffice-commits] core.git: Branch 'private/moggi/debug-opengl' - 2 commits - chart2/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Sat Jan 11 10:36:32 PST 2014


 chart2/source/view/main/DummyXShape.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit f452b64ce0255266879850e24430f604a727a505
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Jan 11 19:36:00 2014 +0100

    log the render calls
    
    Change-Id: Ic502f5d7d8036b60364b32434ad95de1eb8879c8

diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 2c4a3e8..b55183e 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -372,6 +372,7 @@ DummyArea2D::DummyArea2D(const drawing::PointSequenceSequence& rShape):
 
 void DummyArea2D::render()
 {
+    SAL_WARN("chart2.opengl", "render DummyArea2D");
     DummyChart* pChart = getRootShape();
     sal_Int32 nPointssCount = maShapes.getLength();
     for(sal_Int32 i = 0; i < nPointssCount; i++)
@@ -412,6 +413,7 @@ DummyCircle::DummyCircle(const awt::Point& rPos, const awt::Size& rSize)
 
 void DummyCircle::render()
 {
+    SAL_WARN("chart2.opengl", "render DummyCircle");
     debugProperties(maProperties);
     DummyChart* pChart = getRootShape();
     std::map<OUString, uno::Any>::const_iterator itr = maProperties.find("FillColor");
@@ -566,6 +568,7 @@ DummyRectangle::DummyRectangle(const awt::Size& rSize, const awt::Point& rPoint,
 
 void DummyRectangle::render()
 {
+    SAL_WARN("chart2.opengl", "render DummyRectangle");
     debugProperties(maProperties);
     DummyChart* pChart = getRootShape();
     std::map< OUString, uno::Any >::const_iterator itr = maProperties.find("FillColor");
@@ -650,6 +653,7 @@ private:
 
 void DummyText::render()
 {
+    SAL_WARN("chart2.opengl", "render DummyText");
     debugProperties(maProperties);
 
     Font aFont;
@@ -789,6 +793,7 @@ uno::Any DummyXShapes::getByIndex(sal_Int32 nIndex)
 
 void DummyXShapes::render()
 {
+    SAL_WARN("chart2.opengl", "render DummyShapes");
     for(std::vector<DummyXShape*>::iterator itr = maShapes.begin(),
             itrEnd = maShapes.end(); itr != itrEnd; ++itr)
     {
@@ -1209,6 +1214,7 @@ void DummyChart::setSize( const awt::Size& aSize )
 
 void DummyChart::render()
 {
+    SAL_WARN("chart2.opengl", "render chart");
     m_GLRender.prepareToRender();
     DummyXShapes::render();
     m_GLRender.renderToBitmap();
commit eedcf5c9f93dedffa61b7edf1497fc4385902b36
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Jan 11 19:32:15 2014 +0100

    disable the logging of properties
    
    Change-Id: I55709b7907af22883e9562ff1c846271743266ca

diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 777b02b..2c4a3e8 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -27,6 +27,8 @@
 
 #include <algorithm>
 
+#define ENABLE_DEBUG_PROPERTIES 0
+
 using namespace com::sun::star;
 
 using namespace std;
@@ -39,10 +41,16 @@ namespace {
 
 struct PrintProperties
 {
+#if ENABLE_DEBUG_PROPERTIES
     void operator()(const std::pair<OUString, uno::Any>& rProp)
     {
         SAL_WARN("chart2.opengl", "Property: " << rProp.first);
     }
+#else
+    void operator()(const std::pair<OUString, uno::Any>&)
+    {
+    }
+#endif
 };
 
 void debugProperties(std::map<OUString, uno::Any>& rProperties)


More information about the Libreoffice-commits mailing list