Code review comment for lp:~mc-return/compiz/compiz.merge-fix1106270-showmouse-plugin-needs-port-to-GLES

Revision history for this message
Michail Bitzes (bitzesmichail) wrote :

Line 83 in showmouse.cpp:

I think it's:
      if (particles.size () * 6 * 3 > vertices_cache.size ())
Not:
      if (particles.size () > vertices_cache.size ())

vertices_cache needs space for 6 vertices, 3 for each triangle(2 triangles per particle), each vertex is stored as 3 GLfloats.

It could be inverted like that(and similarly for the rest caches):
      if (vertices_cache.size () < particles.size () * 6 * 3)
it makes reading it a bit clearer.

review: Needs Fixing

« Back to merge proposal