convert canvas::IRenderModule::PrimitiveType to scoped enum

Change-Id: Idf2e7449ce5b595386f437597ce7ccf00d141db0
Reviewed-on: https://gerrit.libreoffice.org/22634
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin
2016-02-23 10:08:40 +02:00
committed by Noel Grandin
parent 93de1f80e8
commit 81b7de3d9f
3 changed files with 12 additions and 12 deletions

View File

@@ -501,7 +501,7 @@ namespace dxcanvas
mnBeginSceneCount(0),
mbCanUseDynamicTextures(false),
mbError( false ),
meType( PRIMITIVE_TYPE_UNKNOWN ),
meType( PrimitiveType::Unknown ),
maPageSize(),
mad3dpp(),
maNumVertices( VERTEX_BUFFER_SIZE ),
@@ -1038,8 +1038,8 @@ namespace dxcanvas
return;
--mnBeginSceneCount;
meType=PRIMITIVE_TYPE_UNKNOWN;
mnCount=0;
meType = PrimitiveType::Unknown;
mnCount = 0;
}
@@ -1056,7 +1056,7 @@ namespace dxcanvas
switch(meType)
{
case PRIMITIVE_TYPE_TRIANGLE:
case PrimitiveType::Triangle:
{
maVertexCache.push_back(vertex);
++mnCount;
@@ -1064,7 +1064,7 @@ namespace dxcanvas
break;
}
case PRIMITIVE_TYPE_QUAD:
case PrimitiveType::Quad:
{
if(mnCount == 3)
{

View File

@@ -158,7 +158,7 @@ namespace canvas
vertex.z = 0.0f;
{
pRenderModule->beginPrimitive( canvas::IRenderModule::PRIMITIVE_TYPE_QUAD );
pRenderModule->beginPrimitive( canvas::IRenderModule::PrimitiveType::Quad );
// issue an endPrimitive() when leaving the scope
const ::comphelper::ScopeGuard aScopeGuard(
@@ -279,7 +279,7 @@ namespace canvas
vertex.z = 0.0f;
{
pRenderModule->beginPrimitive( canvas::IRenderModule::PRIMITIVE_TYPE_QUAD );
pRenderModule->beginPrimitive( canvas::IRenderModule::PrimitiveType::Quad );
// issue an endPrimitive() when leaving the scope
const ::comphelper::ScopeGuard aScopeGuard(
@@ -385,7 +385,7 @@ namespace canvas
nVertexCount/3 );
#endif
pRenderModule->beginPrimitive( canvas::IRenderModule::PRIMITIVE_TYPE_TRIANGLE );
pRenderModule->beginPrimitive( canvas::IRenderModule::PrimitiveType::Triangle );
// issue an endPrimitive() when leaving the scope
const ::comphelper::ScopeGuard aScopeGuard(

View File

@@ -54,11 +54,11 @@ namespace canvas
/** Type of primitive passed to the render module via
pushVertex()
*/
enum PrimitiveType
enum class PrimitiveType
{
PRIMITIVE_TYPE_UNKNOWN,
PRIMITIVE_TYPE_TRIANGLE,
PRIMITIVE_TYPE_QUAD
Unknown,
Triangle,
Quad
};
virtual ~IRenderModule() {}