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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 238903002: We can reuse the variable which is already declared. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@dfin
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index d408b49cf8a96242e77843f4fcb9afc5f1498fe8..ac3fe6c08c2071600e18d8fe7f3ac9d539a7726f 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -988,7 +988,7 @@ void CanvasRenderingContext2D::fillInternal(const Path& path, const String& wind
return;
}
FloatRect clipBounds;
- if (!drawingContext()->getTransformedClipBounds(&clipBounds)) {
+ if (!c->getTransformedClipBounds(&clipBounds)) {
return;
}
@@ -1270,7 +1270,7 @@ void CanvasRenderingContext2D::fillRect(float x, float y, float width, float hei
if (!state().m_invertibleCTM)
return;
FloatRect clipBounds;
- if (!drawingContext()->getTransformedClipBounds(&clipBounds))
+ if (!c->getTransformedClipBounds(&clipBounds))
return;
// from the HTML5 Canvas spec:
@@ -1607,9 +1607,10 @@ template<class T> void CanvasRenderingContext2D::fullCanvasCompositedDrawImage(
{
ASSERT(isFullCanvasCompositeMode(op));
- drawingContext()->beginLayer(1, op);
- drawImageToContext(image, drawingContext(), dest, src, CompositeSourceOver);
- drawingContext()->endLayer();
+ GraphicsContext* c = drawingContext();
+ c->beginLayer(1, op);
+ drawImageToContext(image, c, dest, src, CompositeSourceOver);
+ c->endLayer();
}
static void fillPrimitive(const FloatRect& rect, GraphicsContext* context)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698