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

Side by Side Diff: include/core/SkCanvas.h

Issue 305253002: fix casting issue with or operator (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
« no previous file with comments | « no previous file | 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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #ifndef SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 1507
1508 private: 1508 private:
1509 SkBitmap fBitmap; // used if peekPixels() fails 1509 SkBitmap fBitmap; // used if peekPixels() fails
1510 const void* fAddr; // NULL on failure 1510 const void* fAddr; // NULL on failure
1511 SkImageInfo fInfo; 1511 SkImageInfo fInfo;
1512 size_t fRowBytes; 1512 size_t fRowBytes;
1513 }; 1513 };
1514 1514
1515 static inline SkCanvas::SaveFlags operator|(const SkCanvas::SaveFlags lhs, 1515 static inline SkCanvas::SaveFlags operator|(const SkCanvas::SaveFlags lhs,
1516 const SkCanvas::SaveFlags rhs) { 1516 const SkCanvas::SaveFlags rhs) {
1517 return static_cast<SkCanvas::SaveFlags>(lhs | rhs); 1517 return static_cast<SkCanvas::SaveFlags>(static_cast<int>(lhs) | static_cast< int>(rhs));
1518 } 1518 }
1519 1519
1520 static inline SkCanvas::SaveFlags& operator|=(SkCanvas::SaveFlags& lhs, 1520 static inline SkCanvas::SaveFlags& operator|=(SkCanvas::SaveFlags& lhs,
1521 const SkCanvas::SaveFlags rhs) { 1521 const SkCanvas::SaveFlags rhs) {
1522 lhs = lhs | rhs; 1522 lhs = lhs | rhs;
1523 return lhs; 1523 return lhs;
1524 } 1524 }
1525 1525
1526 1526
1527 #endif 1527 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698