Bug 798033 - Removes "using namespace" directive from gfx headers - r=jmuizelaar
☠☠ backed out by 224fddb79a38 ☠ ☠
authorMatt Joras <mjoras@sbcglobal.net>
Mon, 15 Oct 2012 13:02:21 -0400
changeset 110428 621cfd13ceaf4c3cce0aaaef12323544789f1650
parent 110427 39d70a2e0deab2b037be3c22e87337d2f2196e8d
child 110429 1d60a0de1ec1b5372a68e39d656c416c2b07e797
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersjmuizelaar
bugs798033
milestone19.0a1
Bug 798033 - Removes "using namespace" directive from gfx headers - r=jmuizelaar
gfx/2d/DrawTargetSkia.h
gfx/layers/basic/BasicCanvasLayer.cpp
gfx/layers/ipc/ShadowLayerUtilsX11.cpp
gfx/layers/ipc/ShadowLayers.h
--- a/gfx/2d/DrawTargetSkia.h
+++ b/gfx/2d/DrawTargetSkia.h
@@ -6,17 +6,16 @@
 #pragma once
 
 #include "skia/SkCanvas.h"
 #include "2D.h"
 #include "Rect.h"
 #include "PathSkia.h"
 #include <sstream>
 #include <vector>
-using namespace std;
 
 namespace mozilla {
 namespace gfx {
 
 class SourceSurfaceSkia;
 
 class DrawTargetSkia : public DrawTarget
 {
@@ -100,13 +99,13 @@ private:
   void RemoveSnapshot(SourceSurfaceSkia* aSnapshot);
 
   void MarkChanged();
 
   IntSize mSize;
   SkBitmap mBitmap;
   SkRefPtr<SkCanvas> mCanvas;
   SkRefPtr<SkDevice> mDevice;
-  vector<SourceSurfaceSkia*> mSnapshots;
+  std::vector<SourceSurfaceSkia*> mSnapshots;
 };
 
 }
 }
--- a/gfx/layers/basic/BasicCanvasLayer.cpp
+++ b/gfx/layers/basic/BasicCanvasLayer.cpp
@@ -9,16 +9,17 @@
 #include "gfxUtils.h"
 #include "gfxPlatform.h"
 #include "mozilla/Preferences.h"
 
 #include "BasicLayersImpl.h"
 #include "nsXULAppAPI.h"
 
 using namespace mozilla::gfx;
+using namespace mozilla::gl;
 
 namespace mozilla {
 namespace layers {
 
 class BasicCanvasLayer : public CanvasLayer,
                          public BasicImplData
 {
 public:
--- a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp
@@ -9,16 +9,18 @@
 #include "mozilla/layers/ShadowLayers.h"
  
 #include "gfxPlatform.h"
 
 #include "gfxXlibSurface.h"
 #include "mozilla/X11Util.h"
 #include "cairo-xlib.h"
 
+using namespace mozilla::gl;
+
 namespace mozilla {
 namespace layers {
 
 // Return true if we're likely compositing using X and so should use
 // Xlib surfaces in shadow layers.
 static bool
 UsingXCompositing()
 {
--- a/gfx/layers/ipc/ShadowLayers.h
+++ b/gfx/layers/ipc/ShadowLayers.h
@@ -18,17 +18,16 @@
 class gfxSharedImageSurface;
 
 namespace mozilla {
 
 namespace gl {
 class GLContext;
 class TextureImage;
 }
-using namespace gl;
 
 namespace layers {
 
 class Edit;
 class EditReply;
 class OptionalThebesBuffer;
 class PLayerChild;
 class PLayersChild;
@@ -411,18 +410,18 @@ public:
 
   virtual void NotifyShadowTreeTransaction() {}
 
   /**
    * Try to open |aDescriptor| for direct texturing.  If the
    * underlying surface supports direct texturing, a non-null
    * TextureImage is returned.  Otherwise null is returned.
    */
-  static already_AddRefed<TextureImage>
-  OpenDescriptorForDirectTexturing(GLContext* aContext,
+  static already_AddRefed<gl::TextureImage>
+  OpenDescriptorForDirectTexturing(gl::GLContext* aContext,
                                    const SurfaceDescriptor& aDescriptor,
                                    GLenum aWrapMode);
 
   static void PlatformSyncBeforeReplyUpdate();
 
   void SetCompositorID(uint32_t aID)
   {
     NS_ASSERTION(mCompositorID==0, "The compositor ID must be set only once.");