зеркало из https://github.com/mozilla/moz-skia.git
fixes for some warnings:
- #if of something that was not defined - explicit constructor call for baseclass in copy-constructor of subclass http://code.google.com/p/skia/issues/detail?id=112 git-svn-id: http://skia.googlecode.com/svn/trunk@727 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
759b0363da
Коммит
c921843d85
5
Makefile
5
Makefile
|
@ -6,6 +6,7 @@ GPP := g++
|
|||
C_INCLUDES := -Iinclude/config -Iinclude/core -Iinclude/effects -Iinclude/images -Iinclude/gpu -Iinclude/utils -Igpu/include
|
||||
|
||||
CFLAGS := -Wall -fstrict-aliasing
|
||||
#CFLAGS += -W -Wextra -Wcast-align -Wchar-subscripts -Wformat -Wformat-security -Wno-format-y2k -Wno-parentheses -Wno-unused-parameter -Wpointer-arith -Wreturn-type -Wundef -Wwrite-strings
|
||||
CFLAGS_SSE2 = $(CFLAGS) -msse2
|
||||
LINKER_OPTS := -lpthread -lz
|
||||
DEFINES := -DSK_CAN_USE_FLOAT
|
||||
|
@ -19,9 +20,9 @@ endif
|
|||
|
||||
ifeq ($(SKIA_DEBUG),true)
|
||||
DEFINES += -DSK_DEBUG -DSK_SUPPORT_UNIT -DGR_DEBUG=1
|
||||
CFLAGS := -g
|
||||
CFLAGS += -g
|
||||
else
|
||||
CFLAGS := -O2
|
||||
CFLAGS += -O2
|
||||
DEFINES += -DSK_RELEASE -DGR_DEBUG=0
|
||||
endif
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
#undef GR_IOS_BUILD
|
||||
#define GR_IOS_BUILD 1
|
||||
// #error "IOS"
|
||||
#elif ANDROID_NDK || defined(ANDROID)
|
||||
#elif (defined(ANDROID_NDK) && ANDROID_NDK) || defined(ANDROID)
|
||||
#undef GR_ANDROID_BUILD
|
||||
#define GR_ANDROID_BUILD 1
|
||||
// #error "ANDROID"
|
||||
|
@ -87,15 +87,28 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(GR_DEBUG) && !defined(GR_RELEASE)
|
||||
#ifdef NDEBUG
|
||||
#define GR_DEBUG 0
|
||||
// we need both GR_DEBUG and GR_RELEASE to be defined as 0 or 1
|
||||
//
|
||||
#ifndef GR_DEBUG
|
||||
#ifdef GR_RELEASE
|
||||
#define GR_DEBUG !GR_RELEASE
|
||||
#else
|
||||
#define GR_DEBUG 1
|
||||
#ifdef NDEBUG
|
||||
#define GR_DEBUG 0
|
||||
#else
|
||||
#define GR_DEBUG 1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GR_RELEASE
|
||||
#define GR_RELEASE !GR_DEBUG
|
||||
#endif
|
||||
|
||||
#if GR_DEBUG == GR_RELEASE
|
||||
#error "GR_DEBUG and GR_RELEASE must not be the same
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -159,7 +172,7 @@ extern void GrPrintf(const char format[], ...);
|
|||
* particular compiler.
|
||||
* To insert compiler warnings use "#pragma message GR_WARN(<string>)"
|
||||
*/
|
||||
#if _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER
|
||||
#define GR_WARN(MSG) (GR_FILE_AND_LINE_STR "WARNING: " MSG)
|
||||
#else//__GNUC__ - may need other defines for different compilers
|
||||
#define GR_WARN(MSG) ("WARNING: " MSG)
|
||||
|
@ -239,7 +252,7 @@ extern void GrPrintf(const char format[], ...);
|
|||
// VS 2010 and GCC compiled with c++0x or gnu++0x support the new
|
||||
// static_assert.
|
||||
#if !defined(GR_STATIC_ASSERT)
|
||||
#if (_MSC_VER >= 1600) || __GXX_EXPERIMENTAL_CXX0X__
|
||||
#if (defined(_MSC_VER) && _MSC_VER >= 1600) || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)
|
||||
#define GR_STATIC_ASSERT(CONDITION) static_assert(CONDITION, "bug")
|
||||
#else
|
||||
template <bool> class GR_STATIC_ASSERT_FAILURE;
|
||||
|
|
|
@ -78,6 +78,8 @@ private:
|
|||
}
|
||||
|
||||
friend class Iter;
|
||||
|
||||
typedef GrPathSink INHERITED;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -104,7 +104,7 @@ extern void GrGLInitExtensions(GrGLExts* exts) {
|
|||
|
||||
bool fboFound = false;
|
||||
#if GR_SUPPORT_GLDESKTOP
|
||||
#if GL_VERSION_3_0
|
||||
#if defined(GL_VERSION_3_0) && GL_VERSION_3_0
|
||||
if (!fboFound && major >= 3) { // all of ARB_fbo is in 3.x
|
||||
exts->GenFramebuffers = glGenFramebuffers;
|
||||
exts->BindFramebuffer = glBindFramebuffer;
|
||||
|
|
|
@ -1166,12 +1166,6 @@ void GrGpuGL::drawNonIndexedHelper(PrimitiveType type,
|
|||
GR_GL(DrawArrays(gPrimitiveType2GLMode[type], 0, vertexCount));
|
||||
}
|
||||
|
||||
#if !defined(SK_GL_HAS_COLOR4UB)
|
||||
static inline GrFixed byte2fixed(unsigned value) {
|
||||
return (value + (value >> 7)) << 8;
|
||||
}
|
||||
#endif
|
||||
|
||||
void GrGpuGL::resolveTextureRenderTarget(GrGLTexture* texture) {
|
||||
GrGLRenderTarget* rt = (GrGLRenderTarget*) texture->asRenderTarget();
|
||||
|
||||
|
|
|
@ -177,10 +177,6 @@ void gl_version(int* major, int* minor);
|
|||
#define GrGL_RestoreResetRowLength()
|
||||
#endif
|
||||
|
||||
#if SK_TextGLType != GL_FIXED
|
||||
#define SK_GL_HAS_COLOR4UB
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Some drivers want the var-int arg to be zero-initialized on input.
|
||||
*/
|
||||
|
|
|
@ -192,11 +192,7 @@ static const char* gfshad[] = {
|
|||
"void main() {\n"
|
||||
// On Brian's PC laptop with Intel Gfx texture2DProj seems to be broken
|
||||
// but it works everywhere else tested.
|
||||
#if GR_GLSL_2DPROJ_BROKEN
|
||||
" gl_FragColor = vColor * texture2D(sTexture, vTexture.xy / vTexture.z);\n"
|
||||
#else
|
||||
" gl_FragColor = vColor * texture2DProj(sTexture, vTexture);\n"
|
||||
#endif
|
||||
|
||||
"}\n",
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
GrPath::GrPath() {}
|
||||
|
||||
GrPath::GrPath(const GrPath& src) {
|
||||
GrPath::GrPath(const GrPath& src) : INHERITED() {
|
||||
}
|
||||
|
||||
GrPath::GrPath(GrPathIter& iter) {
|
||||
|
|
|
@ -128,6 +128,8 @@ private:
|
|||
uint32_t fFlags;
|
||||
|
||||
SkTDArray<SkLayer*> m_children;
|
||||
|
||||
typedef SkRefCnt INHERITED;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,7 @@ SkLayer::SkLayer() {
|
|||
#endif
|
||||
}
|
||||
|
||||
SkLayer::SkLayer(const SkLayer& src) {
|
||||
SkLayer::SkLayer(const SkLayer& src) : INHERITED() {
|
||||
fParent = NULL;
|
||||
m_opacity = src.m_opacity;
|
||||
m_size = src.m_size;
|
||||
|
|
Загрузка…
Ссылка в новой задаче