Bug 1577916 - Remove using namespace std from gfx/layers r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D44285

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Eric Rahm 2019-09-02 16:53:17 +00:00
parent 5d8eacc755
commit bb149919a3
10 changed files with 10 additions and 23 deletions

View File

@ -39,8 +39,6 @@
#include <utility>
#include <vector>
using namespace std;
namespace mozilla {
using namespace gfx;
@ -574,7 +572,7 @@ class RemoteBufferReadbackProcessor : public TextureReadbackSink {
private:
nsTArray<ReadbackProcessor::Update> mReadbackUpdates;
// This array is used to keep the layers alive until the callback.
vector<RefPtr<Layer>> mLayerRefs;
std::vector<RefPtr<Layer>> mLayerRefs;
IntRect mBufferRect;
nsIntPoint mBufferRotation;

View File

@ -17,7 +17,6 @@ namespace mozilla {
namespace layers {
using namespace gfx;
using namespace std;
const Float sBackgroundOpacity = 0.8f;
const SurfaceFormat sTextureFormat = SurfaceFormat::B8G8R8A8;
@ -51,7 +50,7 @@ TextRenderer::~TextRenderer() {}
TextRenderer::FontCache::~FontCache() { mGlyphBitmaps->Unmap(); }
void TextRenderer::RenderText(Compositor* aCompositor, const string& aText,
void TextRenderer::RenderText(Compositor* aCompositor, const std::string& aText,
const IntPoint& aOrigin,
const Matrix4x4& aTransform, uint32_t aTextSize,
uint32_t aTargetPixelWidth, FontType aFontType) {
@ -80,7 +79,7 @@ void TextRenderer::RenderText(Compositor* aCompositor, const string& aText,
aCompositor->DrawQuad(Rect(drawRect), clip, chain, 1.0f, transform);
}
IntSize TextRenderer::ComputeSurfaceSize(const string& aText,
IntSize TextRenderer::ComputeSurfaceSize(const std::string& aText,
uint32_t aTargetPixelWidth,
FontType aFontType) {
if (!EnsureInitialized(aFontType)) {

View File

@ -30,7 +30,6 @@ namespace layers {
using namespace mozilla::gfx;
using namespace mozilla::widget;
using namespace mozilla::layers::mlg;
using namespace std;
// Defined in CompositorD3D11.cpp.
bool CanUsePartialPresents(ID3D11Device* aDevice);

View File

@ -114,7 +114,6 @@ namespace layers {
using namespace mozilla::ipc;
using namespace mozilla::gfx;
using namespace std;
using base::ProcessId;
using base::Thread;
@ -236,7 +235,7 @@ CompositorBridgeParent::LayerTreeState::~LayerTreeState() {
}
}
typedef map<LayersId, CompositorBridgeParent::LayerTreeState> LayerTreeMap;
typedef std::map<LayersId, CompositorBridgeParent::LayerTreeState> LayerTreeMap;
LayerTreeMap sIndirectLayerTrees;
StaticAutoPtr<mozilla::Monitor> sIndirectLayerTreesLock;
@ -268,7 +267,7 @@ inline void CompositorBridgeParent::ForEachIndirectLayerTree(
* compositions without having to keep references to the
* compositor
*/
typedef map<uint64_t, CompositorBridgeParent*> CompositorMap;
typedef std::map<uint64_t, CompositorBridgeParent*> CompositorMap;
static StaticAutoPtr<CompositorMap> sCompositorMap;
void CompositorBridgeParent::Setup() {

View File

@ -42,7 +42,6 @@ namespace mozilla {
namespace layers {
using namespace mozilla::gfx;
using namespace std;
CompositorVsyncScheduler::Observer::Observer(CompositorVsyncScheduler* aOwner)
: mMutex("CompositorVsyncScheduler.Observer.Mutex"), mOwner(aOwner) {}

View File

@ -42,14 +42,12 @@
# include "ProfilerMarkerPayload.h"
#endif
using namespace std;
namespace mozilla {
namespace layers {
// defined in CompositorBridgeParent.cpp
typedef map<LayersId, CompositorBridgeParent::LayerTreeState> LayerTreeMap;
typedef std::map<LayersId, CompositorBridgeParent::LayerTreeState> LayerTreeMap;
extern LayerTreeMap sIndirectLayerTrees;
extern StaticAutoPtr<mozilla::Monitor> sIndirectLayerTreesLock;
void UpdateIndirectTree(LayersId aId, Layer* aRoot,

View File

@ -32,8 +32,6 @@
# include "mozilla/gfx/DeviceManagerDx.h"
#endif
using namespace std;
namespace mozilla {
namespace layers {

View File

@ -8,8 +8,6 @@
#include "BufferCache.h"
#include "MLGDevice.h"
using namespace std;
namespace mozilla {
namespace layers {

View File

@ -62,7 +62,6 @@
namespace mozilla {
using namespace std;
using namespace gfx;
namespace layers {

View File

@ -7,7 +7,7 @@
#include "OGLShaderProgram.h"
#include <stdint.h> // for uint32_t
#include <sstream> // for ostringstream
#include <sstream> // for std::ostringstream
#include "gfxEnv.h"
#include "gfxRect.h" // for gfxRect
#include "gfxUtils.h"
@ -21,7 +21,7 @@
namespace mozilla {
namespace layers {
using namespace std;
using std::endl;
#define GAUSSIAN_KERNEL_HALF_WIDTH 11
#define GAUSSIAN_KERNEL_STEP 0.2
@ -157,7 +157,7 @@ void ShaderConfigOGL::SetDynamicGeometry(bool aEnabled) {
/* static */
ProgramProfileOGL ProgramProfileOGL::GetProfileFor(ShaderConfigOGL aConfig) {
ProgramProfileOGL result;
ostringstream fs, vs;
std::ostringstream fs, vs;
AddUniforms(result);
@ -854,7 +854,7 @@ bool ShaderProgramOGL::Initialize() {
NS_ASSERTION(mProgramState == STATE_NEW,
"Shader program has already been initialised");
ostringstream vs, fs;
std::ostringstream vs, fs;
for (uint32_t i = 0; i < mProfile.mDefines.Length(); ++i) {
vs << mProfile.mDefines[i] << endl;
fs << mProfile.mDefines[i] << endl;