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

Side by Side Diff: Source/core/paint/NinePieceImagePainter.cpp

Issue 1334703002: NOT FOR LANDING Pass URL to Image::draw (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/paint/MediaControlsPainter.cpp ('k') | Source/core/paint/SVGImagePainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "config.h" 5 #include "config.h"
6 #include "core/paint/NinePieceImagePainter.h" 6 #include "core/paint/NinePieceImagePainter.h"
7 7
8 #include "core/layout/ImageQualityController.h" 8 #include "core/layout/ImageQualityController.h"
9 #include "core/layout/LayoutBoxModelObject.h" 9 #include "core/layout/LayoutBoxModelObject.h"
10 #include "core/paint/BoxPainter.h" 10 #include "core/paint/BoxPainter.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 graphicsContext->setImageInterpolationQuality(interpolationQuality); 59 graphicsContext->setImageInterpolationQuality(interpolationQuality);
60 60
61 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", 61 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data",
62 InspectorPaintImageEvent::data(m_layoutObject, *styleImage)); 62 InspectorPaintImageEvent::data(m_layoutObject, *styleImage));
63 63
64 for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) { 64 for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) {
65 NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawIn fo(piece); 65 NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawIn fo(piece);
66 66
67 if (drawInfo.isDrawable) { 67 if (drawInfo.isDrawable) {
68 if (drawInfo.isCornerPiece) { 68 if (drawInfo.isCornerPiece) {
69 graphicsContext->drawImage(image.get(), drawInfo.destination, dr awInfo.source, op); 69 graphicsContext->drawImage(image.get(), drawInfo.destination, dr awInfo.source, KURL(), op); // TODO(davve): empty url
70 } else { 70 } else {
71 graphicsContext->drawTiledImage(image.get(), enclosingIntRect(dr awInfo.destination), 71 graphicsContext->drawTiledImage(image.get(), enclosingIntRect(dr awInfo.destination),
72 enclosingIntRect(drawInfo.source), drawInfo.tileScale, drawI nfo.tileRule.horizontal, 72 enclosingIntRect(drawInfo.source), drawInfo.tileScale, KURL( ), drawInfo.tileRule.horizontal, // TODO(davve): empty url
73 drawInfo.tileRule.vertical, op); 73 drawInfo.tileRule.vertical, op);
74 } 74 }
75 } 75 }
76 } 76 }
77 77
78 graphicsContext->setImageInterpolationQuality(previousInterpolationQuality); 78 graphicsContext->setImageInterpolationQuality(previousInterpolationQuality);
79 return true; 79 return true;
80 } 80 }
81 81
82 } // namespace blink 82 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/MediaControlsPainter.cpp ('k') | Source/core/paint/SVGImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698