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

Side by Side Diff: gm/gm.cpp

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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/gamma.cpp ('k') | gm/hairmodes.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 2011 Google Inc. 2 * Copyright 2011 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 "SkShader.h" 9 #include "SkShader.h"
10 using namespace skiagm; 10 using namespace skiagm;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 fBGColor = color; 51 fBGColor = color;
52 } 52 }
53 53
54 bool GM::animate(const SkAnimTimer& timer) { 54 bool GM::animate(const SkAnimTimer& timer) {
55 return this->onAnimate(timer); 55 return this->onAnimate(timer);
56 } 56 }
57 57
58 //////////////////////////////////////////////////////////////////////////////// ///////////// 58 //////////////////////////////////////////////////////////////////////////////// /////////////
59 59
60 void GM::onDrawBackground(SkCanvas* canvas) { 60 void GM::onDrawBackground(SkCanvas* canvas) {
61 canvas->drawColor(fBGColor, SkXfermode::kSrc_Mode); 61 canvas->drawColor(fBGColor, SkBlendMode::kSrc);
62 } 62 }
63 63
64 void GM::drawSizeBounds(SkCanvas* canvas, SkColor color) { 64 void GM::drawSizeBounds(SkCanvas* canvas, SkColor color) {
65 SkISize size = this->getISize(); 65 SkISize size = this->getISize();
66 SkRect r = SkRect::MakeWH(SkIntToScalar(size.width()), 66 SkRect r = SkRect::MakeWH(SkIntToScalar(size.width()),
67 SkIntToScalar(size.height())); 67 SkIntToScalar(size.height()));
68 SkPaint paint; 68 SkPaint paint;
69 paint.setColor(color); 69 paint.setColor(color);
70 canvas->drawRect(r, paint); 70 canvas->drawRect(r, paint);
71 } 71 }
(...skipping 28 matching lines...) Expand all
100 fDrawProc(canvas); 100 fDrawProc(canvas);
101 } 101 }
102 102
103 SkISize skiagm::SimpleGM::onISize() { 103 SkISize skiagm::SimpleGM::onISize() {
104 return fSize; 104 return fSize;
105 } 105 }
106 106
107 SkString skiagm::SimpleGM::onShortName() { 107 SkString skiagm::SimpleGM::onShortName() {
108 return fName; 108 return fName;
109 } 109 }
OLDNEW
« no previous file with comments | « gm/gamma.cpp ('k') | gm/hairmodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698