[Libreoffice-commits] core.git: canvas/source include/canvas
Noel Grandin
noel at peralex.com
Wed Feb 24 08:11:40 UTC 2016
canvas/source/directx/dx_9rm.cxx | 10 +++++-----
canvas/source/tools/surface.cxx | 6 +++---
include/canvas/rendering/irendermodule.hxx | 8 ++++----
3 files changed, 12 insertions(+), 12 deletions(-)
New commits:
commit 81b7de3d9f29d3aa14446b5c3624fe62cdbebd30
Author: Noel Grandin <noel at peralex.com>
Date: Tue Feb 23 10:08:40 2016 +0200
convert canvas::IRenderModule::PrimitiveType to scoped enum
Change-Id: Idf2e7449ce5b595386f437597ce7ccf00d141db0
Reviewed-on: https://gerrit.libreoffice.org/22634
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index 633e5a9..8d697e1 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -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)
{
diff --git a/canvas/source/tools/surface.cxx b/canvas/source/tools/surface.cxx
index 8cd5e93..c1ff5a2 100644
--- a/canvas/source/tools/surface.cxx
+++ b/canvas/source/tools/surface.cxx
@@ -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(
diff --git a/include/canvas/rendering/irendermodule.hxx b/include/canvas/rendering/irendermodule.hxx
index 9eeffa5..01dc944 100644
--- a/include/canvas/rendering/irendermodule.hxx
+++ b/include/canvas/rendering/irendermodule.hxx
@@ -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() {}
More information about the Libreoffice-commits
mailing list