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

Side by Side Diff: gm/xfermodeimagefilter.cpp

Issue 1077763002: Change some more GMs to clear to opaque black, not transparent black. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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/tileimagefilter.cpp ('k') | 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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "sk_tool_utils.h" 9 #include "sk_tool_utils.h"
10 #include "SkArithmeticMode.h" 10 #include "SkArithmeticMode.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 void onOnceBeforeDraw() override { 68 void onOnceBeforeDraw() override {
69 make_bitmap(); 69 make_bitmap();
70 70
71 fCheckerboard.allocN32Pixels(80, 80); 71 fCheckerboard.allocN32Pixels(80, 80);
72 SkCanvas checkerboardCanvas(fCheckerboard); 72 SkCanvas checkerboardCanvas(fCheckerboard);
73 sk_tool_utils::draw_checkerboard(&checkerboardCanvas, 0xFFA0A0A0, 0xFF40 4040, 8); 73 sk_tool_utils::draw_checkerboard(&checkerboardCanvas, 0xFFA0A0A0, 0xFF40 4040, 8);
74 } 74 }
75 75
76 void onDraw(SkCanvas* canvas) override { 76 void onDraw(SkCanvas* canvas) override {
77 canvas->clear(0x00000000); 77 canvas->clear(SK_ColorBLACK);
78 SkPaint paint; 78 SkPaint paint;
79 79
80 const struct { 80 const struct {
81 SkXfermode::Mode fMode; 81 SkXfermode::Mode fMode;
82 const char* fLabel; 82 const char* fLabel;
83 } gModes[] = { 83 } gModes[] = {
84 { SkXfermode::kClear_Mode, "Clear" }, 84 { SkXfermode::kClear_Mode, "Clear" },
85 { SkXfermode::kSrc_Mode, "Src" }, 85 { SkXfermode::kSrc_Mode, "Src" },
86 { SkXfermode::kDst_Mode, "Dst" }, 86 { SkXfermode::kDst_Mode, "Dst" },
87 { SkXfermode::kSrcOver_Mode, "SrcOver" }, 87 { SkXfermode::kSrcOver_Mode, "SrcOver" },
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 private: 201 private:
202 SkBitmap fBitmap, fCheckerboard; 202 SkBitmap fBitmap, fCheckerboard;
203 typedef GM INHERITED; 203 typedef GM INHERITED;
204 }; 204 };
205 205
206 ////////////////////////////////////////////////////////////////////////////// 206 //////////////////////////////////////////////////////////////////////////////
207 207
208 DEF_GM( return new XfermodeImageFilterGM; ); 208 DEF_GM( return new XfermodeImageFilterGM; );
209 209
210 } 210 }
OLDNEW
« no previous file with comments | « gm/tileimagefilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698