Bug 945588 - Add include guards to SkConfig8888.h
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 03 Dec 2013 11:09:56 -0500
changeset 158571 d48872b9112c543c775e44133e7977a64150f9a7
parent 158570 5cb5fdb72e55dd40361b0e5ff6e74c06db6cc213
child 158572 80f74b6e3644567ab0b7ebb0ad361a3f3967ee0f
push id25749
push userryanvm@gmail.com
push dateTue, 03 Dec 2013 21:45:20 +0000
treeherdermozilla-central@85694fd9b17c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs945588
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 945588 - Add include guards to SkConfig8888.h
gfx/skia/patches/0031-Bug-945588-Add-include-guard.patch
gfx/skia/patches/README
gfx/skia/src/core/SkConfig8888.h
new file mode 100644
--- /dev/null
+++ b/gfx/skia/patches/0031-Bug-945588-Add-include-guard.patch
@@ -0,0 +1,39 @@
+# HG changeset patch
+# User Ehsan Akhgari <ehsan@mozilla.com>
+
+Bug 945588 - Add include guards to SkConfig8888.h
+
+diff --git a/gfx/skia/src/core/SkConfig8888.h b/gfx/skia/src/core/SkConfig8888.h
+index 96eaef2..36bc9b4 100644
+--- a/gfx/skia/src/core/SkConfig8888.h
++++ b/gfx/skia/src/core/SkConfig8888.h
+@@ -1,16 +1,18 @@
+ 
+ /*
+  * Copyright 2011 Google Inc.
+  *
+  * Use of this source code is governed by a BSD-style license that can be
+  * found in the LICENSE file.
+  */
+ 
++#ifndef SkConfig8888_DEFINED
++#define SkConfig8888_DEFINED
+ 
+ #include "SkCanvas.h"
+ #include "SkColorPriv.h"
+ 
+ /**
+  * Converts pixels from one Config8888 to another Config8888
+  */
+ void SkConvertConfig8888Pixels(uint32_t* dstPixels,
+@@ -69,8 +71,10 @@ static inline void SkCopyConfig8888ToBitmap(const SkBitmap& dstBmp,
+     int h = dstBmp.height();
+     size_t dstRowBytes = dstBmp.rowBytes();
+     uint32_t* dstPixels = reinterpret_cast<uint32_t*>(dstBmp.getPixels());
+ 
+     SkConvertConfig8888Pixels(dstPixels, dstRowBytes, SkCanvas::kNative_Premul_Config8888, srcPixels, srcRowBytes, srcConfig8888, w, h);
+ }
+ 
+ }
++
++#endif
--- a/gfx/skia/patches/README
+++ b/gfx/skia/patches/README
@@ -7,8 +7,9 @@ 0001-Bug-777614-Re-add-our-SkUserConfig.
 0004-Bug-777614-Re-apply-bug-719872-Fix-crash-on-Android-.patch
 0005-Bug-777614-Re-apply-bug-687188-Expand-the-gradient-c.patch
 0009-Bug-777614-Re-apply-759683-Handle-compilers-that-don.patch
 0018-Bug-817356-PPC-defines.patch
 0010-Bug-836892-Add-new-blending-modes-to-SkXfermode.patch
 0011-Bug-839347-no-anon-namespace-around-SkNO_RETURN_HINT.patch
 0012-Bug-751418-Add-our-own-GrUserConfig-r-mattwoodrow.patch
 0013-Bug-751418-Fix-compile-error-on-gcc-in-Skia-GL-r-mat.patch
+0031-Bug-945588-Add-include-guard.patch
--- a/gfx/skia/src/core/SkConfig8888.h
+++ b/gfx/skia/src/core/SkConfig8888.h
@@ -1,16 +1,18 @@
 
 /*
  * Copyright 2011 Google Inc.
  *
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
 
+#ifndef SkConfig8888_DEFINED
+#define SkConfig8888_DEFINED
 
 #include "SkCanvas.h"
 #include "SkColorPriv.h"
 
 /**
  * Converts pixels from one Config8888 to another Config8888
  */
 void SkConvertConfig8888Pixels(uint32_t* dstPixels,
@@ -69,8 +71,10 @@ static inline void SkCopyConfig8888ToBit
     int h = dstBmp.height();
     size_t dstRowBytes = dstBmp.rowBytes();
     uint32_t* dstPixels = reinterpret_cast<uint32_t*>(dstBmp.getPixels());
 
     SkConvertConfig8888Pixels(dstPixels, dstRowBytes, SkCanvas::kNative_Premul_Config8888, srcPixels, srcRowBytes, srcConfig8888, w, h);
 }
 
 }
+
+#endif