aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrGpuGLShaders2.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-26 01:44:18 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-26 01:44:18 +0000
commit386900790bbb2c07a6cc39bd46feb2e6526dbe01 (patch)
tree850dfa7303580583e4e7aecd878330b71eee6e6e /gpu/src/GrGpuGLShaders2.cpp
parent3636ed558fb2af5a48a9634efec55fd8a87c88d7 (diff)
fix warnings, including using GrTCast<> to go from &Obj -> uint32_t*
git-svn-id: http://skia.googlecode.com/svn/trunk@732 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGpuGLShaders2.cpp')
-rw-r--r--gpu/src/GrGpuGLShaders2.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/gpu/src/GrGpuGLShaders2.cpp b/gpu/src/GrGpuGLShaders2.cpp
index 25d0aeb927..225abc1cf3 100644
--- a/gpu/src/GrGpuGLShaders2.cpp
+++ b/gpu/src/GrGpuGLShaders2.cpp
@@ -245,7 +245,7 @@ GrGpuGLShaders2::ProgramCache::HashKey::HashKey(const ProgramDesc& desc) {
// if you change the size of the desc, need to update the hash function
GR_STATIC_ASSERT(12 == sizeof(ProgramDesc));
- uint32_t* d = (uint32_t*) &fDesc;
+ uint32_t* d = GrTCast<uint32_t*>(&fDesc);
fHash = d[0] ^ ror(d[1]) ^ rol(d[2]);
}
@@ -298,25 +298,25 @@ static inline void tex_attr_name(int coordIdx, GrStringBuilder* s) {
static inline const char* float_vector_type(int count) {
static const char* FLOAT_VECS[] = {"ERROR", "float", "vec2", "vec3", "vec4"};
- GrAssert(count >= 1 && count < GR_ARRAY_COUNT(FLOAT_VECS));
+ GrAssert(count >= 1 && count < (int)GR_ARRAY_COUNT(FLOAT_VECS));
return FLOAT_VECS[count];
}
static inline const char* vector_homog_coord(int count) {
static const char* HOMOGS[] = {"ERROR", "", ".y", ".z", ".w"};
- GrAssert(count >= 1 && count < GR_ARRAY_COUNT(HOMOGS));
+ GrAssert(count >= 1 && count < (int)GR_ARRAY_COUNT(HOMOGS));
return HOMOGS[count];
}
static inline const char* vector_nonhomog_coords(int count) {
static const char* NONHOMOGS[] = {"ERROR", "", ".x", ".xy", ".xyz"};
- GrAssert(count >= 1 && count < GR_ARRAY_COUNT(NONHOMOGS));
+ GrAssert(count >= 1 && count < (int)GR_ARRAY_COUNT(NONHOMOGS));
return NONHOMOGS[count];
}
static inline const char* vector_all_coords(int count) {
static const char* ALL[] = {"ERROR", "", ".xy", ".xyz", ".xyzw"};
- GrAssert(count >= 1 && count < GR_ARRAY_COUNT(ALL));
+ GrAssert(count >= 1 && count < (int)GR_ARRAY_COUNT(ALL));
return ALL[count];
}