Commit a57d049a authored by jbroman@chromium.org's avatar jbroman@chromium.org

Remove GraphicsContext::fastMod and ::isDrawingToLayer.

fastMod has been dead code for over one year (since I removed the only call site):
https://chromiumcodereview.appspot.com/14718009

isDrawingToLayer is trivial, and its only call site is inside GraphicsContext.

Review URL: https://codereview.chromium.org/332443003

git-svn-id: svn://svn.chromium.org/blink/trunk@175986 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 86098880
...@@ -381,7 +381,7 @@ bool GraphicsContext::couldUseLCDRenderedText() ...@@ -381,7 +381,7 @@ bool GraphicsContext::couldUseLCDRenderedText()
// rendered text cannot be composited correctly when the layer is // rendered text cannot be composited correctly when the layer is
// collapsed. Therefore, subpixel text is contextDisabled when we are drawing // collapsed. Therefore, subpixel text is contextDisabled when we are drawing
// onto a layer. // onto a layer.
if (contextDisabled() || isDrawingToLayer() || !isCertainlyOpaque()) if (contextDisabled() || m_canvas->isDrawingToLayer() || !isCertainlyOpaque())
return false; return false;
return shouldSmoothFonts(); return shouldSmoothFonts();
......
...@@ -427,28 +427,11 @@ private: ...@@ -427,28 +427,11 @@ private:
static void draw2xMarker(SkBitmap*, int); static void draw2xMarker(SkBitmap*, int);
#endif #endif
// Return value % max, but account for value possibly being negative.
static int fastMod(int value, int max)
{
bool isNeg = false;
if (value < 0) {
value = -value;
isNeg = true;
}
if (value >= max)
value %= max;
if (isNeg)
value = -value;
return value;
}
// Helpers for drawing a focus ring (drawFocusRing) // Helpers for drawing a focus ring (drawFocusRing)
void drawOuterPath(const SkPath&, SkPaint&, int); void drawOuterPath(const SkPath&, SkPaint&, int);
void drawInnerPath(const SkPath&, SkPaint&, int); void drawInnerPath(const SkPath&, SkPaint&, int);
// SkCanvas wrappers. // SkCanvas wrappers.
bool isDrawingToLayer() const { return m_canvas->isDrawingToLayer(); }
void clipPath(const SkPath&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op); void clipPath(const SkPath&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op);
void clipRRect(const SkRRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op); void clipRRect(const SkRRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment