--- a/Makefile.in
+++ b/Makefile.in
@@ -32,16 +32,17 @@ tier_base_dirs = \
probes \
mfbt \
$(NULL)
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))
tier_base_dirs += \
other-licenses/android \
$(NULL)
endif
--- a/gfx/skia/Makefile.in
+++ b/gfx/skia/Makefile.in
@@ -226,17 +226,17 @@ CPPSRCS = \
SkLayerDrawLooper.cpp \
SkLayerRasterizer.cpp \
SkLineClipper.cpp \
SkMallocPixelRef.cpp \
SkMask.cpp \
SkMaskFilter.cpp \
SkMath.cpp \
SkMatrix.cpp \
- SkMemory_mozalloc.cpp \
+ SkMemory_malloc.cpp \
SkMetaData.cpp \
SkMorphologyImageFilter.cpp \
SkOrderedReadBuffer.cpp \
SkOrderedWriteBuffer.cpp \
SkOSFile_stdio.cpp \
SkOTUtils.cpp \
SkPackBits.cpp \
SkPaint.cpp \
--- a/gfx/skia/include/config/SkUserConfig.h
+++ b/gfx/skia/include/config/SkUserConfig.h
@@ -30,26 +30,16 @@
Below are optional defines that add, subtract, or change default behavior
in Skia. Your port can locally edit this file to enable/disable flags as
you choose, or these can be delared on your command line (i.e. -Dfoo).
By default, this include file will always default to having all of the flags
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
floats or 16.16 integers (fixed). Exactly one of these two symbols must be
defined.
*/
//#define SK_SCALAR_IS_FLOAT
//#define SK_SCALAR_IS_FIXED
deleted file mode 100644
--- a/gfx/skia/src/ports/SkMemory_mozalloc.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-
-/*
- * 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);
-}
-
--- a/toolkit/toolkit-tiers.mk
+++ b/toolkit/toolkit-tiers.mk
@@ -174,23 +174,16 @@ tier_platform_dirs += \
content \
editor \
layout \
docshell \
embedding \
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
ifdef ACCESSIBILITY
tier_platform_dirs += accessible
endif