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

Side by Side Diff: third_party/WebKit/Source/core/paint/HTMLCanvasPainter.cpp

Issue 2787173005: Some cleanup after https://codereview.chromium.org/2751433002 (Closed)
Patch Set: none Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/HTMLCanvasPainter.h" 5 #include "core/paint/HTMLCanvasPainter.h"
6 6
7 #include "core/html/HTMLCanvasElement.h" 7 #include "core/html/HTMLCanvasElement.h"
8 #include "core/html/canvas/CanvasRenderingContext.h" 8 #include "core/html/canvas/CanvasRenderingContext.h"
9 #include "core/layout/LayoutHTMLCanvas.h" 9 #include "core/layout/LayoutHTMLCanvas.h"
10 #include "core/paint/LayoutObjectDrawingRecorder.h" 10 #include "core/paint/LayoutObjectDrawingRecorder.h"
11 #include "core/paint/PaintInfo.h" 11 #include "core/paint/PaintInfo.h"
12 #include "platform/geometry/LayoutPoint.h" 12 #include "platform/geometry/LayoutPoint.h"
13 #include "platform/graphics/paint/ClipRecorder.h"
14 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" 13 #include "platform/graphics/paint/ForeignLayerDisplayItem.h"
15 14
16 namespace blink { 15 namespace blink {
17 16
18 void HTMLCanvasPainter::paintReplaced(const PaintInfo& paintInfo, 17 void HTMLCanvasPainter::paintReplaced(const PaintInfo& paintInfo,
19 const LayoutPoint& paintOffset) { 18 const LayoutPoint& paintOffset) {
20 GraphicsContext& context = paintInfo.context; 19 GraphicsContext& context = paintInfo.context;
21 20
22 LayoutRect contentRect = m_layoutHTMLCanvas.contentBoxRect(); 21 LayoutRect contentRect = m_layoutHTMLCanvas.contentBoxRect();
23 contentRect.moveBy(paintOffset); 22 contentRect.moveBy(paintOffset);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 context.imageInterpolationQuality(); 65 context.imageInterpolationQuality();
67 context.setImageInterpolationQuality(interpolationQuality); 66 context.setImageInterpolationQuality(interpolationQuality);
68 canvas->paint(context, paintRect); 67 canvas->paint(context, paintRect);
69 context.setImageInterpolationQuality(previousInterpolationQuality); 68 context.setImageInterpolationQuality(previousInterpolationQuality);
70 69
71 if (clip) 70 if (clip)
72 context.restore(); 71 context.restore();
73 } 72 }
74 73
75 } // namespace blink 74 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698