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

Side by Side Diff: src/utils/debugger/SkDrawCommand.cpp

Issue 81293002: Fix SkScalar conversion warning. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkDrawCommand.h" 10 #include "SkDrawCommand.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 491 }
492 492
493 void SkDrawPictureCommand::execute(SkCanvas* canvas) { 493 void SkDrawPictureCommand::execute(SkCanvas* canvas) {
494 canvas->drawPicture(fPicture); 494 canvas->drawPicture(fPicture);
495 } 495 }
496 496
497 bool SkDrawPictureCommand::render(SkCanvas* canvas) const { 497 bool SkDrawPictureCommand::render(SkCanvas* canvas) const {
498 canvas->clear(0xFFFFFFFF); 498 canvas->clear(0xFFFFFFFF);
499 canvas->save(); 499 canvas->save();
500 500
501 SkRect bounds = SkRect::MakeWH(fPicture.width(), fPicture.height()); 501 SkRect bounds = SkRect::MakeWH(SkIntToScalar(fPicture.width()),
502 SkIntToScalar(fPicture.height()));
502 xlate_and_scale_to_bounds(canvas, bounds); 503 xlate_and_scale_to_bounds(canvas, bounds);
503 504
504 canvas->drawPicture(const_cast<SkPicture&>(fPicture)); 505 canvas->drawPicture(const_cast<SkPicture&>(fPicture));
505 506
506 canvas->restore(); 507 canvas->restore();
507 508
508 return true; 509 return true;
509 } 510 }
510 511
511 SkDrawPointsCommand::SkDrawPointsCommand(SkCanvas::PointMode mode, size_t count, 512 SkDrawPointsCommand::SkDrawPointsCommand(SkCanvas::PointMode mode, size_t count,
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 fDy = dy; 890 fDy = dy;
890 fDrawType = TRANSLATE; 891 fDrawType = TRANSLATE;
891 892
892 fInfo.push(SkObjectParser::ScalarToString(dx, "SkScalar dx: ")); 893 fInfo.push(SkObjectParser::ScalarToString(dx, "SkScalar dx: "));
893 fInfo.push(SkObjectParser::ScalarToString(dy, "SkScalar dy: ")); 894 fInfo.push(SkObjectParser::ScalarToString(dy, "SkScalar dy: "));
894 } 895 }
895 896
896 void SkTranslateCommand::execute(SkCanvas* canvas) { 897 void SkTranslateCommand::execute(SkCanvas* canvas) {
897 canvas->translate(fDx, fDy); 898 canvas->translate(fDx, fDy);
898 } 899 }
OLDNEW
« 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