Build on Linux. draft
authorJeff Gilbert <jdashg@gmail.com>
Thu, 17 Dec 2015 16:16:55 -0800
changeset 316113 c4ba968014028455a903b6cd16c181fece6c6c35
parent 316112 10632695ebea7914f8e2a39f1352c97250392491
child 316114 09930b4d17d4de04d36a2010ad4310aeb4d9da95
push id8514
push userjgilbert@mozilla.com
push dateFri, 18 Dec 2015 00:24:33 +0000
milestone45.0a1
Build on Linux.
dom/canvas/TexUnpackBlob.cpp
dom/canvas/TexUnpackBlob.h
layout/base/nsLayoutUtils.cpp
layout/base/nsLayoutUtils.h
--- a/dom/canvas/TexUnpackBlob.cpp
+++ b/dom/canvas/TexUnpackBlob.cpp
@@ -5,16 +5,17 @@
 
 #include "TexUnpackBlob.h"
 
 #include "GLBlitHelper.h"
 #include "GLContext.h"
 #include "GLDefs.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/HTMLCanvasElement.h"
+#include "mozilla/RefPtr.h"
 #include "nsLayoutUtils.h"
 #include "WebGLContext.h"
 #include "WebGLTexelConversions.h"
 #include "WebGLTexture.h"
 
 namespace mozilla {
 namespace webgl {
 
@@ -239,16 +240,19 @@ TexUnpackBytes::TexOrSubImage(bool isSub
 // TexUnpackImage
 
 TexUnpackImage::TexUnpackImage(const RefPtr<layers::Image>& image, bool isAlphaPremult)
     : TexUnpackBlob(image->GetSize().width, image->GetSize().height, 1, true)
     , mImage(image)
     , mIsAlphaPremult(isAlphaPremult)
 { }
 
+TexUnpackImage::~TexUnpackImage()
+{ }
+
 void
 TexUnpackImage::TexOrSubImage(bool isSubImage, bool needsRespec, const char* funcName,
                               WebGLTexture* tex, TexImageTarget target, GLint level,
                               const webgl::DriverUnpackInfo* dui, GLint xOffset,
                               GLint yOffset, GLint zOffset, GLenum* const out_glError)
 {
     MOZ_ASSERT_IF(needsRespec, !isSubImage);
     *out_glError = 0;
@@ -702,16 +706,19 @@ TexUnpackSurface::ConvertSurface(WebGLCo
 
 TexUnpackSurface::TexUnpackSurface(const RefPtr<gfx::SourceSurface>& surf,
                                    bool isAlphaPremult)
     : TexUnpackBlob(surf->GetSize().width, surf->GetSize().height, 1, true)
     , mSurf(surf)
     , mIsAlphaPremult(isAlphaPremult)
 { }
 
+TexUnpackSurface::~TexUnpackSurface()
+{ }
+
 void
 TexUnpackSurface::TexOrSubImage(bool isSubImage, bool needsRespec, const char* funcName,
                                 WebGLTexture* tex, TexImageTarget target, GLint level,
                                 const webgl::DriverUnpackInfo* dui, GLint xOffset,
                                 GLint yOffset, GLint zOffset, GLenum* const out_glError)
 {
     *out_glError = 0;
 
--- a/dom/canvas/TexUnpackBlob.h
+++ b/dom/canvas/TexUnpackBlob.h
@@ -2,21 +2,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef TEX_UNPACK_BLOB_H_
 #define TEX_UNPACK_BLOB_H_
 
 #include "GLContextTypes.h"
-#include "GLDefs.h"
-#include "mozilla/RefPtr.h"
-#include "mozilla/gfx/Point.h"
+#include "GLTypes.h"
 #include "WebGLStrongTypes.h"
 
+
+template <class T>
+class RefPtr;
+
 namespace mozilla {
 
 class UniqueBuffer;
 class WebGLContext;
 class WebGLTexture;
 
 namespace dom {
 class Element;
@@ -99,16 +101,17 @@ public:
 
 class TexUnpackImage : public TexUnpackBlob
 {
 public:
     const RefPtr<layers::Image> mImage;
     const bool mIsAlphaPremult;
 
     TexUnpackImage(const RefPtr<layers::Image>& image, bool isAlphaPremult);
+    virtual ~TexUnpackImage() override;
 
     virtual bool ValidateUnpack(WebGLContext* webgl, const char* funcName, bool isFunc3D,
                                 const webgl::PackingInfo& pi) override
     {
         return true;
     }
 
     virtual void TexOrSubImage(bool isSubImage, bool needsRespec, const char* funcName,
@@ -120,16 +123,17 @@ public:
 
 class TexUnpackSurface : public TexUnpackBlob
 {
 public:
     const RefPtr<gfx::SourceSurface> mSurf;
     const bool mIsAlphaPremult;
 
     TexUnpackSurface(const RefPtr<gfx::SourceSurface>& surf, bool isAlphaPremult);
+    virtual ~TexUnpackSurface() override;
 
     virtual bool ValidateUnpack(WebGLContext* webgl, const char* funcName, bool isFunc3D,
                                 const webgl::PackingInfo& pi) override
     {
         return true;
     }
 
     virtual void TexOrSubImage(bool isSubImage, bool needsRespec, const char* funcName,
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -8269,20 +8269,16 @@ nsLayoutUtils::SurfaceFromElementResult:
   : mIsWriteOnly(true)
   , mIsStillLoading(false)
   , mHasSize(false)
   , mCORSUsed(false)
   , mIsPremultiplied(true)
 {
 }
 
-nsLayoutUtils::SurfaceFromElementResult::~SurfaceFromElementResult()
-{
-}
-
 const RefPtr<mozilla::gfx::SourceSurface>&
 nsLayoutUtils::SurfaceFromElementResult::GetSourceSurface()
 {
   if (!mSourceSurface && mLayersImage) {
     mSourceSurface = mLayersImage->GetAsSourceSurface();
   }
 
   return mSourceSurface;
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -24,16 +24,17 @@
 #include "nsStyleConsts.h"
 #include "nsGkAtoms.h"
 #include "nsRuleNode.h"
 #include "imgIContainer.h"
 #include "mozilla/gfx/2D.h"
 #include "Units.h"
 #include "mozilla/ToString.h"
 #include "nsHTMLReflowMetrics.h"
+#include "ImageContainer.h"
 
 #include <limits>
 #include <algorithm>
 
 class nsPresContext;
 class nsIContent;
 class nsIAtom;
 class nsIScrollableFrame;
@@ -2128,17 +2129,16 @@ public:
     /* Whether the element used CORS when loading. */
     bool mCORSUsed;
     /* Whether the returned image contains premultiplied pixel data */
     bool mIsPremultiplied;
 
     // Methods:
 
     SurfaceFromElementResult();
-    ~SurfaceFromElementResult();
 
     // Gets mSourceSurface, or makes a SourceSurface from mLayersImage.
     const RefPtr<mozilla::gfx::SourceSurface>& GetSourceSurface();
   };
 
   static SurfaceFromElementResult SurfaceFromElement(mozilla::dom::Element *aElement,
                                                      uint32_t aSurfaceFlags = 0,
                                                      DrawTarget *aTarget = nullptr);