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

Side by Side Diff: gm/tallstretchedbitmaps.cpp

Issue 867963004: remove unused GM flags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guarded flags Created 5 years, 11 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 | « gm/stroketext.cpp ('k') | gm/techtalk1.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 /* 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 int startItem = fTallBmps[i].fItemCnt - 10; 84 int startItem = fTallBmps[i].fItemCnt - 10;
85 int itemHeight = bmp.height() / fTallBmps[i].fItemCnt; 85 int itemHeight = bmp.height() / fTallBmps[i].fItemCnt;
86 SkIRect subRect = SkIRect::MakeLTRB(0, startItem * itemHeight, 86 SkIRect subRect = SkIRect::MakeLTRB(0, startItem * itemHeight,
87 bmp.width(), bmp.height()); 87 bmp.width(), bmp.height());
88 SkRect dstRect = SkRect::MakeWH(SkIntToScalar(bmp.width()), 10.f * i temHeight); 88 SkRect dstRect = SkRect::MakeWH(SkIntToScalar(bmp.width()), 10.f * i temHeight);
89 SkPaint paint; 89 SkPaint paint;
90 paint.setFilterLevel(SkPaint::kLow_FilterLevel); 90 paint.setFilterLevel(SkPaint::kLow_FilterLevel);
91 canvas->drawBitmapRect(bmp, &subRect, dstRect, &paint); 91 canvas->drawBitmapRect(bmp, &subRect, dstRect, &paint);
92 canvas->translate(SkIntToScalar(bmp.width() + 10), 0); 92 canvas->translate(SkIntToScalar(bmp.width() + 10), 0);
93 } 93 }
94 }
95
96 uint32_t onGetFlags() const SK_OVERRIDE {
97 // This GM causes issues in replay modes.
98 return kSkipTiled_Flag | kNoBBH_Flag | kSkipPicture_Flag;
99 } 94 }
100 95
101 private: 96 private:
102 struct { 97 struct {
103 SkBitmap fBmp; 98 SkBitmap fBmp;
104 int fItemCnt; 99 int fItemCnt;
105 } fTallBmps[8]; 100 } fTallBmps[8];
106 typedef skiagm::GM INHERITED; 101 typedef skiagm::GM INHERITED;
107 }; 102 };
108 103
109 ////////////////////////////////////////////////////////////////////////////// 104 //////////////////////////////////////////////////////////////////////////////
110 105
111 DEF_GM(return SkNEW(TallStretchedBitmapsGM);) 106 DEF_GM(return SkNEW(TallStretchedBitmapsGM);)
112 107
OLDNEW
« no previous file with comments | « gm/stroketext.cpp ('k') | gm/techtalk1.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698