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

Side by Side Diff: gm/tallstretchedbitmaps.cpp

Issue 798723002: More win64 warning fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@size_t
Patch Set: off_t is signed Created 6 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 | « dm/DMWriteTask.cpp ('k') | include/core/SkTypes.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 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 SkString onShortName() SK_OVERRIDE { 62 SkString onShortName() SK_OVERRIDE {
63 return SkString("tall_stretched_bitmaps"); 63 return SkString("tall_stretched_bitmaps");
64 } 64 }
65 65
66 SkISize onISize() SK_OVERRIDE { 66 SkISize onISize() SK_OVERRIDE {
67 return SkISize::Make(750, 750); 67 return SkISize::Make(750, 750);
68 } 68 }
69 69
70 void onOnceBeforeDraw() SK_OVERRIDE { 70 void onOnceBeforeDraw() SK_OVERRIDE {
71 for (size_t i = 0; i < SK_ARRAY_COUNT(fTallBmps); ++i) { 71 for (size_t i = 0; i < SK_ARRAY_COUNT(fTallBmps); ++i) {
72 int h = (4 + i) * 1024; 72 int h = SkToInt((4 + i) * 1024);
73 73
74 fTallBmps[i].fItemCnt = make_bm(&fTallBmps[i].fBmp, h); 74 fTallBmps[i].fItemCnt = make_bm(&fTallBmps[i].fBmp, h);
75 } 75 }
76 } 76 }
77 77
78 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 78 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
79 canvas->scale(1.3f, 1.3f); 79 canvas->scale(1.3f, 1.3f);
80 for (size_t i = 0; i < SK_ARRAY_COUNT(fTallBmps); ++i) { 80 for (size_t i = 0; i < SK_ARRAY_COUNT(fTallBmps); ++i) {
81 SkASSERT(fTallBmps[i].fItemCnt > 10); 81 SkASSERT(fTallBmps[i].fItemCnt > 10);
82 SkBitmap bmp = fTallBmps[i].fBmp; 82 SkBitmap bmp = fTallBmps[i].fBmp;
(...skipping 20 matching lines...) Expand all
103 SkBitmap fBmp; 103 SkBitmap fBmp;
104 int fItemCnt; 104 int fItemCnt;
105 } fTallBmps[8]; 105 } fTallBmps[8];
106 typedef skiagm::GM INHERITED; 106 typedef skiagm::GM INHERITED;
107 }; 107 };
108 108
109 ////////////////////////////////////////////////////////////////////////////// 109 //////////////////////////////////////////////////////////////////////////////
110 110
111 DEF_GM(return SkNEW(TallStretchedBitmapsGM);) 111 DEF_GM(return SkNEW(TallStretchedBitmapsGM);)
112 112
OLDNEW
« no previous file with comments | « dm/DMWriteTask.cpp ('k') | include/core/SkTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698