summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2014-12-11 23:02:01 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-11 23:02:01 +0000
commit2965dab9091382803430a0607118e20e93d2bd1d (patch)
tree171368ac803c8ec49dea700767f57f7c00f0e5c1 /opengl
parentd9799072de47ecd3e6d4cdb2bfd3db75f4d94bd5 (diff)
parentbceb29c83ea54d38b38e40d66402e56364cff56b (diff)
downloadframeworks_native-2965dab9091382803430a0607118e20e93d2bd1d.zip
frameworks_native-2965dab9091382803430a0607118e20e93d2bd1d.tar.gz
frameworks_native-2965dab9091382803430a0607118e20e93d2bd1d.tar.bz2
am bceb29c8: Merge "Fix clang -Wc++11-narrowing warnings."
* commit 'bceb29c83ea54d38b38e40d66402e56364cff56b': Fix clang -Wc++11-narrowing warnings.
Diffstat (limited to 'opengl')
-rw-r--r--opengl/tests/EGLTest/egl_cache_test.cpp8
-rw-r--r--opengl/tests/angeles/app-linux.cpp2
-rw-r--r--opengl/tests/fillrate/fillrate.cpp10
-rw-r--r--opengl/tests/filter/filter.cpp9
-rw-r--r--opengl/tests/linetex/linetex.cpp6
5 files changed, 20 insertions, 15 deletions
diff --git a/opengl/tests/EGLTest/egl_cache_test.cpp b/opengl/tests/EGLTest/egl_cache_test.cpp
index c7d9e3e..c5bf296 100644
--- a/opengl/tests/EGLTest/egl_cache_test.cpp
+++ b/opengl/tests/EGLTest/egl_cache_test.cpp
@@ -41,7 +41,7 @@ protected:
};
TEST_F(EGLCacheTest, UninitializedCacheAlwaysMisses) {
- char buf[4] = { 0xee, 0xee, 0xee, 0xee };
+ uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee };
mCache->setBlob("abcd", 4, "efgh", 4);
ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4));
ASSERT_EQ(0xee, buf[0]);
@@ -51,7 +51,7 @@ TEST_F(EGLCacheTest, UninitializedCacheAlwaysMisses) {
}
TEST_F(EGLCacheTest, InitializedCacheAlwaysHits) {
- char buf[4] = { 0xee, 0xee, 0xee, 0xee };
+ uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee };
mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY));
mCache->setBlob("abcd", 4, "efgh", 4);
ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4));
@@ -62,7 +62,7 @@ TEST_F(EGLCacheTest, InitializedCacheAlwaysHits) {
}
TEST_F(EGLCacheTest, TerminatedCacheAlwaysMisses) {
- char buf[4] = { 0xee, 0xee, 0xee, 0xee };
+ uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee };
mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY));
mCache->setBlob("abcd", 4, "efgh", 4);
mCache->terminate();
@@ -94,7 +94,7 @@ protected:
};
TEST_F(EGLCacheSerializationTest, ReinitializedCacheContainsValues) {
- char buf[4] = { 0xee, 0xee, 0xee, 0xee };
+ uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee };
mCache->setCacheFilename(mFilename);
mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY));
mCache->setBlob("abcd", 4, "efgh", 4);
diff --git a/opengl/tests/angeles/app-linux.cpp b/opengl/tests/angeles/app-linux.cpp
index e490351..ced8786 100644
--- a/opengl/tests/angeles/app-linux.cpp
+++ b/opengl/tests/angeles/app-linux.cpp
@@ -118,7 +118,7 @@ static void checkEGLErrors()
fprintf(stderr, "EGL Error: 0x%04x\n", (int)error);
}
-static int initGraphics(unsigned samples, const WindowSurface& windowSurface)
+static int initGraphics(EGLint samples, const WindowSurface& windowSurface)
{
EGLint configAttribs[] = {
EGL_DEPTH_SIZE, 16,
diff --git a/opengl/tests/fillrate/fillrate.cpp b/opengl/tests/fillrate/fillrate.cpp
index 1d9b026..2db63d7 100644
--- a/opengl/tests/fillrate/fillrate.cpp
+++ b/opengl/tests/fillrate/fillrate.cpp
@@ -91,11 +91,13 @@ int main(int argc, char** argv)
}
}
+ const GLfloat fh = h;
+ const GLfloat fw = w;
const GLfloat vertices[4][2] = {
- { 0, 0 },
- { 0, h },
- { w, h },
- { w, 0 }
+ { 0, 0 },
+ { 0, fh },
+ { fw, fh },
+ { fw, 0 }
};
const GLfloat texCoords[4][2] = {
diff --git a/opengl/tests/filter/filter.cpp b/opengl/tests/filter/filter.cpp
index 289e6cc..287ee93 100644
--- a/opengl/tests/filter/filter.cpp
+++ b/opengl/tests/filter/filter.cpp
@@ -140,11 +140,12 @@ int main(int argc, char** argv)
//glDrawTexiOES(0, 0, 0, dim, dim);
+ const GLfloat fdim = dim;
const GLfloat vertices[4][2] = {
- { 0, 0 },
- { 0, dim },
- { dim, dim },
- { dim, 0 }
+ { 0, 0 },
+ { 0, fdim },
+ { fdim, fdim },
+ { fdim, 0 }
};
const GLfloat texCoords[4][2] = {
diff --git a/opengl/tests/linetex/linetex.cpp b/opengl/tests/linetex/linetex.cpp
index 7921f80..5ad695b 100644
--- a/opengl/tests/linetex/linetex.cpp
+++ b/opengl/tests/linetex/linetex.cpp
@@ -80,9 +80,11 @@ int main(int argc, char** argv)
// default pack-alignment is 4
const uint16_t t16[64] = { 0xFFFF, 0, 0xF800, 0, 0x07E0, 0, 0x001F, 0 };
+ const GLfloat fh = h;
+ const GLfloat fw2 = w/2;
const GLfloat vertices[4][2] = {
- { w/2, 0 },
- { w/2, h }
+ { fw2, 0 },
+ { fw2, fh }
};
const GLfloat texCoords[4][2] = {