Skip to content
Snippets Groups Projects
Commit 3966995e authored by George Wright's avatar George Wright
Browse files

Backed out changeset c2475674e105

parent 638da0ba
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@ ifndef LIBXUL_SDK
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
tier_base_dirs += \
other-licenses/android \
other-licenses/skia-npapi \
$(NULL)
endif
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
......
......@@ -231,7 +231,7 @@ CPPSRCS = \
SkMaskFilter.cpp \
SkMath.cpp \
SkMatrix.cpp \
SkMemory_mozalloc.cpp \
SkMemory_malloc.cpp \
SkMetaData.cpp \
SkMorphologyImageFilter.cpp \
SkOrderedReadBuffer.cpp \
......
......@@ -35,16 +35,6 @@
commented out, so including it will have no effect.
*/
/*
Override new/delete with Mozilla's allocator, mozalloc
Ideally we shouldn't need to do this here, but until
http://code.google.com/p/skia/issues/detail?id=598 is fixed
we need to include this here to override operator new and delete
*/
#include "mozilla/mozalloc.h"
///////////////////////////////////////////////////////////////////////////////
/* Scalars (the fractional value type in skia) can be implemented either as
......
/*
* Copyright 2011 Google Inc.
* Copyright 2012 Mozilla Foundation
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkTypes.h"
#include "mozilla/mozalloc.h"
#include "mozilla/mozalloc_oom.h"
void sk_throw() {
SkDEBUGFAIL("sk_throw");
mozalloc_abort("Abort from sk_throw");
}
void sk_out_of_memory(void) {
SkDEBUGFAIL("sk_out_of_memory");
mozalloc_handle_oom(0);
}
void* sk_malloc_throw(size_t size) {
return sk_malloc_flags(size, SK_MALLOC_THROW);
}
void* sk_realloc_throw(void* addr, size_t size) {
return moz_xrealloc(addr, size);
}
void sk_free(void* p) {
moz_free(p);
}
void* sk_malloc_flags(size_t size, unsigned flags) {
return (flags & SK_MALLOC_THROW) ? moz_xmalloc(size) : moz_malloc(size);
}
......@@ -179,13 +179,6 @@ tier_platform_dirs += \
xpfe/appshell \
$(NULL)
# This needs to be built after the gfx/ directory
# to ensure all dependencies for skia (e.g. mozalloc, xpcom)
# have been built
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
tier_platform_dirs += other-licenses/skia-npapi
endif
ifdef MOZ_UNIVERSALCHARDET
tier_platform_dirs += extensions/universalchardet
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment