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

Side by Side Diff: gm/stroketext.cpp

Issue 322963002: hide SkBitmap::setConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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
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 "SkDashPathEffect.h" 10 #include "SkDashPathEffect.h"
11 11
12 static void test_nulldev(SkCanvas* canvas) { 12 static void test_nulldev(SkCanvas* canvas) {
13 SkBitmap bm; 13 SkBitmap bm;
14 bm.setConfig(SkBitmap::kARGB_8888_Config, 30, 30); 14 bm.setInfo(SkImageInfo::MakeN32Premul(30, 30));
15 // notice: no pixels mom! be sure we don't crash 15 // notice: no pixels mom! be sure we don't crash
16 // https://code.google.com/p/chromium/issues/detail?id=352616 16 // https://code.google.com/p/chromium/issues/detail?id=352616
17 SkCanvas c(bm); 17 SkCanvas c(bm);
18 18
19 SkBitmap src; 19 SkBitmap src;
20 src.allocN32Pixels(10, 10); 20 src.allocN32Pixels(10, 10);
21 src.eraseColor(SK_ColorRED); 21 src.eraseColor(SK_ColorRED);
22 22
23 // ensure we don't crash 23 // ensure we don't crash
24 c.writePixels(src, 0, 0); 24 c.writePixels(src, 0, 0);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 canvas->translate(600, 0); 94 canvas->translate(600, 0);
95 paint.setTextSize(kAboveThreshold_TextSize); 95 paint.setTextSize(kAboveThreshold_TextSize);
96 draw_text_set(canvas, paint); 96 draw_text_set(canvas, paint);
97 } 97 }
98 98
99 private: 99 private:
100 typedef skiagm::GM INHERITED; 100 typedef skiagm::GM INHERITED;
101 }; 101 };
102 102
103 DEF_GM( return SkNEW(StrokeTextGM); ) 103 DEF_GM( return SkNEW(StrokeTextGM); )
OLDNEW
« no previous file with comments | « experimental/PdfViewer/src/SkPdfRenderer.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698