Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaria Volvenkova <d.volvenkova@corp.mail.ru>2017-05-16 14:42:32 +0300
committerGitHub <noreply@github.com>2017-05-16 14:42:32 +0300
commitd2f79bd2c7004af2d1459e8d5b7748763f241a54 (patch)
tree64300bccb750e59f7c3a05800eafcd5c3b3f89cb /drape/drape_tests/memory_comparer.hpp
parentaa6703383e8d4c2ff8445e8b3c27728846cdab4b (diff)
parent086d6f9cf247cea07cff6bc33d5567dc7c64806b (diff)
Merge pull request #6040 from rokuz/es3-supportbeta-810
Added OpenGL ES3 support
Diffstat (limited to 'drape/drape_tests/memory_comparer.hpp')
-rw-r--r--drape/drape_tests/memory_comparer.hpp35
1 files changed, 11 insertions, 24 deletions
diff --git a/drape/drape_tests/memory_comparer.hpp b/drape/drape_tests/memory_comparer.hpp
index d7cdd0e003..eb6a3fbdeb 100644
--- a/drape/drape_tests/memory_comparer.hpp
+++ b/drape/drape_tests/memory_comparer.hpp
@@ -1,46 +1,36 @@
#pragma once
-#include "testing/testing.hpp"
-#include "drape/glconstants.hpp"
#include "base/logging.hpp"
+#include "drape/glconstants.hpp"
+#include "testing/testing.hpp"
-#include "std/cstring.hpp"
+#include <cstring>
namespace dp
{
-
struct MemoryComparer
{
void * m_mem;
int m_size;
- MemoryComparer(void * memory, int size)
- : m_mem(memory)
- , m_size(size)
- {
- }
-
+ MemoryComparer(void * memory, int size) : m_mem(memory), m_size(size) {}
void cmpSubBuffer(glConst /*type*/, uint32_t size, void const * data, uint32_t /*offset*/) const
{
TEST_EQUAL(size, m_size, ());
TEST_EQUAL(memcmp(m_mem, data, size), 0, ());
}
- void cmpSubImage(uint32_t /*x*/, uint32_t /*y*/, uint32_t width, uint32_t height,
- glConst layout, glConst pixelFormat, void const * data) const
+ void cmpSubImage(uint32_t /*x*/, uint32_t /*y*/, uint32_t width, uint32_t height, glConst layout,
+ glConst pixelFormat, void const * data) const
{
uint32_t channelCount = 0;
- if (layout == gl_const::GLRGBA ||
- layout == gl_const::GLRGBA8 ||
- layout == gl_const::GLRGBA4)
+ if (layout == gl_const::GLRGBA || layout == gl_const::GLRGBA8 || layout == gl_const::GLRGBA4)
channelCount = 4;
else if (layout == gl_const::GLRGB)
channelCount = 3;
- else if (layout == gl_const::GLAlpha ||
- layout == gl_const::GLAlpha8 ||
- layout == gl_const::GLLuminance ||
- layout == gl_const::GLLuminance8 ||
- layout == gl_const::GLAlphaLuminance)
+ else if (layout == gl_const::GLAlpha || layout == gl_const::GLAlpha8 ||
+ layout == gl_const::GLLuminance || layout == gl_const::GLLuminance8 ||
+ layout == gl_const::GLAlphaLuminance || layout == gl_const::GLRed)
{
channelCount = 1;
}
@@ -55,9 +45,6 @@ struct MemoryComparer
for (int i = 0; i < m_size; ++i)
TEST_EQUAL(member[i], input[i], (i));
-
- //TEST_EQUAL(memcmp(m_mem, data, m_size), 0, ());
}
};
-
-}
+} // namespace dp