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

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

Issue 1478283002: Less type conversion for NinePieceImage painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | third_party/WebKit/Source/platform/graphics/GraphicsContext.h » ('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/frame/UseCounter.h" 8 #include "core/frame/UseCounter.h"
9 #include "core/layout/ImageQualityController.h" 9 #include "core/layout/ImageQualityController.h"
10 #include "core/layout/LayoutBoxModelObject.h" 10 #include "core/layout/LayoutBoxModelObject.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", 67 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data",
68 InspectorPaintImageEvent::data(m_layoutObject, *styleImage)); 68 InspectorPaintImageEvent::data(m_layoutObject, *styleImage));
69 69
70 for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) { 70 for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) {
71 NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawIn fo(piece); 71 NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawIn fo(piece);
72 72
73 if (drawInfo.isDrawable) { 73 if (drawInfo.isDrawable) {
74 if (drawInfo.isCornerPiece) { 74 if (drawInfo.isCornerPiece) {
75 graphicsContext->drawImage(image.get(), drawInfo.destination, dr awInfo.source, op); 75 graphicsContext->drawImage(image.get(), drawInfo.destination, dr awInfo.source, op);
76 } else { 76 } else {
77 graphicsContext->drawTiledImage(image.get(), enclosingIntRect(dr awInfo.destination), 77 graphicsContext->drawTiledImage(image.get(), drawInfo.destinatio n,
78 enclosingIntRect(drawInfo.source), drawInfo.tileScale, drawI nfo.tileRule.horizontal, 78 drawInfo.source, drawInfo.tileScale, drawInfo.tileRule.horiz ontal,
79 drawInfo.tileRule.vertical, op); 79 drawInfo.tileRule.vertical, op);
80 } 80 }
81 } 81 }
82 } 82 }
83 83
84 graphicsContext->setImageInterpolationQuality(previousInterpolationQuality); 84 graphicsContext->setImageInterpolationQuality(previousInterpolationQuality);
85 return true; 85 return true;
86 } 86 }
87 87
88 } // namespace blink 88 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698