diff options
author | David Tardon <dtardon@redhat.com> | 2012-08-30 09:28:22 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-09-07 10:07:00 +0200 |
commit | 07bb32fdcb7cf58a1a5eb5d2f0c6318c8d6f8ca6 (patch) | |
tree | 83c06c211a549dbfce296aa0731259530e1e2db8 /slideshow | |
parent | 9a6544bc9fd7be64b373c622ca2dbd54fbe0746d (diff) |
drop useless nested anonymous namespace
Change-Id: I0876e253b69fa4ec8262946339bb643aa43f3bad
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx index 2c2aac00417a..8db0a63ad427 100644 --- a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx @@ -117,46 +117,43 @@ private: }; #endif -namespace +struct OGLFormat +{ + GLint nInternalFormat; + GLenum eFormat; + GLenum eType; +}; + +/* channel ordering: (0:rgba, 1:bgra, 2:argb, 3:abgr) + */ +int calcComponentOrderIndex(const uno::Sequence<sal_Int8>& rTags) { - struct OGLFormat + using namespace rendering::ColorComponentTag; + + static const sal_Int8 aOrderTable[] = { - GLint nInternalFormat; - GLenum eFormat; - GLenum eType; + RGB_RED, RGB_GREEN, RGB_BLUE, ALPHA, + RGB_BLUE, RGB_GREEN, RGB_RED, ALPHA, + ALPHA, RGB_RED, RGB_GREEN, RGB_BLUE, + ALPHA, RGB_BLUE, RGB_GREEN, RGB_RED, }; - /* channel ordering: (0:rgba, 1:bgra, 2:argb, 3:abgr) - */ - int calcComponentOrderIndex(const uno::Sequence<sal_Int8>& rTags) + const sal_Int32 nNumComps(rTags.getLength()); + const sal_Int8* pLine=aOrderTable; + for(int i=0; i<4; ++i) { - using namespace rendering::ColorComponentTag; - - static const sal_Int8 aOrderTable[] = - { - RGB_RED, RGB_GREEN, RGB_BLUE, ALPHA, - RGB_BLUE, RGB_GREEN, RGB_RED, ALPHA, - ALPHA, RGB_RED, RGB_GREEN, RGB_BLUE, - ALPHA, RGB_BLUE, RGB_GREEN, RGB_RED, - }; - - const sal_Int32 nNumComps(rTags.getLength()); - const sal_Int8* pLine=aOrderTable; - for(int i=0; i<4; ++i) - { - int j=0; - while( j<4 && j<nNumComps && pLine[j] == rTags[j] ) - ++j; + int j=0; + while( j<4 && j<nNumComps && pLine[j] == rTags[j] ) + ++j; - // all of the line passed, this is a match! - if( j==nNumComps ) - return i; + // all of the line passed, this is a match! + if( j==nNumComps ) + return i; - pLine+=4; - } - - return -1; + pLine+=4; } + + return -1; } // not thread safe |