X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fview.cpp;h=3d984ee9f0f5ef3fe77dd2fccfa0561a61bf304e;hb=b716ae547424e4e4bbda86781a151c31e3a64e67;hp=007b9e056e32458ee5f4d550516461a71c8f49ac;hpb=d68c91a7a2a3a4b3a312a50cbab5a7539d4cd7d5;p=ipdf%2Fcode.git diff --git a/src/view.cpp b/src/view.cpp index 007b9e0..3d984ee 100644 --- a/src/view.cpp +++ b/src/view.cpp @@ -167,6 +167,10 @@ void View::ScaleAroundPoint(Real x, Real y, Real scale_amount) m_bounds.y = vy - top; m_bounds.w *= scale_amount; m_bounds.h *= scale_amount; + if (m_bounds.w == VReal(0)) + { + Debug("Scaled to zero!!!"); + } //Debug("Scale at {%s, %s} by %s View Bounds => %s", x.Str().c_str(), y.Str().c_str(), scale_amount.Str().c_str(), m_bounds.Str().c_str()); @@ -472,6 +476,9 @@ void View::RenderRange(int width, int height, unsigned first_obj, unsigned last_ if (first_obj == last_obj) return; PROFILE_SCOPE("View::RenderRange"); glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 43, -1, "View::RenderRange()"); + + g_profiler.AddCounter("Objects Rendered", last_obj-first_obj); + if (m_render_dirty) // document has changed PrepareRender(); @@ -544,7 +551,7 @@ void View::UpdateObjBoundsVBO(unsigned first_obj, unsigned last_obj) PROFILE_SCOPE("View::UpdateObjBoundsVBO"); if (m_query_gpu_bounds_on_next_frame != NULL) { - fprintf(m_query_gpu_bounds_on_next_frame,"# View: %s\t%s\t%s\t%s", Str(m_bounds.x).c_str(), Str(m_bounds.y).c_str(), Str(m_bounds.w).c_str(), Str(m_bounds.h).c_str()); + fprintf(m_query_gpu_bounds_on_next_frame,"# View: %s\t%s\t%s\t%s\n", Str(m_bounds.x).c_str(), Str(m_bounds.y).c_str(), Str(m_bounds.w).c_str(), Str(m_bounds.h).c_str()); } //m_objbounds_vbo.Invalidate(); @@ -606,7 +613,6 @@ void View::UpdateObjBoundsVBO(unsigned first_obj, unsigned last_obj) continue; Rect obj_bounds = m_document.m_objects.bounds[id]; - obj_bounds.x *= pbounds.w; obj_bounds.x += pbounds.x; obj_bounds.y *= pbounds.h;