Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1309)

Unified Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 519463002: Removing "using" declarations that import names in the C++ Standard library.(Source/platform/[geome… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebasing Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/CrossfadeGeneratedImage.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index e7a7be3100fe1ba320ac44eb20bdb58f814a0088..b0f37c068f5009924f0974aec932dbde145e2afe 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -57,8 +57,6 @@
#include "wtf/Assertions.h"
#include "wtf/MathExtras.h"
-using namespace std;
-
namespace blink {
namespace {
@@ -695,17 +693,17 @@ void GraphicsContext::drawInnerShadow(const RoundedRect& rect, const Color& shad
}
if (clippedEdges & LeftEdge) {
- holeRect.move(-max(shadowOffset.width(), 0) - shadowBlur, 0);
- holeRect.setWidth(holeRect.width() + max(shadowOffset.width(), 0) + shadowBlur);
+ holeRect.move(-std::max(shadowOffset.width(), 0) - shadowBlur, 0);
+ holeRect.setWidth(holeRect.width() + std::max(shadowOffset.width(), 0) + shadowBlur);
}
if (clippedEdges & TopEdge) {
- holeRect.move(0, -max(shadowOffset.height(), 0) - shadowBlur);
- holeRect.setHeight(holeRect.height() + max(shadowOffset.height(), 0) + shadowBlur);
+ holeRect.move(0, -std::max(shadowOffset.height(), 0) - shadowBlur);
+ holeRect.setHeight(holeRect.height() + std::max(shadowOffset.height(), 0) + shadowBlur);
}
if (clippedEdges & RightEdge)
- holeRect.setWidth(holeRect.width() - min(shadowOffset.width(), 0) + shadowBlur);
+ holeRect.setWidth(holeRect.width() - std::min(shadowOffset.width(), 0) + shadowBlur);
if (clippedEdges & BottomEdge)
- holeRect.setHeight(holeRect.height() - min(shadowOffset.height(), 0) + shadowBlur);
+ holeRect.setHeight(holeRect.height() - std::min(shadowOffset.height(), 0) + shadowBlur);
Color fillColor(shadowColor.red(), shadowColor.green(), shadowColor.blue(), 255);
@@ -1123,7 +1121,7 @@ void GraphicsContext::drawPicture(PassRefPtr<SkPicture> picture, const FloatRect
SkPaint picturePaint;
picturePaint.setXfermodeMode(WebCoreCompositeToSkiaComposite(op, blendMode));
picturePaint.setImageFilter(matrixFilter.get());
- SkRect layerBounds = SkRect::MakeWH(max(deviceDest.width(), sourceBounds.width()), max(deviceDest.height(), sourceBounds.height()));
+ SkRect layerBounds = SkRect::MakeWH(std::max(deviceDest.width(), sourceBounds.width()), std::max(deviceDest.height(), sourceBounds.height()));
m_canvas->save();
m_canvas->resetMatrix();
m_canvas->translate(deviceDest.x(), deviceDest.y());
« no previous file with comments | « Source/platform/graphics/CrossfadeGeneratedImage.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698