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

Side by Side Diff: skia/effects/SkPaintFlagsDrawFilter.cpp

Issue 113827: Remove the remainder of the skia source code from the Chromium repo.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « skia/effects/SkNinePatch.cpp ('k') | skia/effects/SkPixelXorXfermode.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include "SkPaintFlagsDrawFilter.h"
2 #include "SkPaint.h"
3
4 SkPaintFlagsDrawFilter::SkPaintFlagsDrawFilter(uint32_t clearFlags,
5 uint32_t setFlags)
6 {
7 fClearFlags = SkToU16(clearFlags & SkPaint::kAllFlags);
8 fSetFlags = SkToU16(setFlags & SkPaint::kAllFlags);
9 }
10
11 bool SkPaintFlagsDrawFilter::filter(SkCanvas*, SkPaint* paint, Type)
12 {
13 fPrevFlags = paint->getFlags();
14 paint->setFlags((fPrevFlags & ~fClearFlags) | fSetFlags);
15 return true;
16 }
17
18 void SkPaintFlagsDrawFilter::restore(SkCanvas*, SkPaint* paint, Type)
19 {
20 paint->setFlags(fPrevFlags);
21 }
22
OLDNEW
« no previous file with comments | « skia/effects/SkNinePatch.cpp ('k') | skia/effects/SkPixelXorXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698