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

Side by Side Diff: src/record/SkRecords.h

Issue 247573003: Fix build: Windows has dibs on IGNORE (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « src/record/SkRecordOpts.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 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 #ifndef SkRecords_DEFINED 8 #ifndef SkRecords_DEFINED
9 #define SkRecords_DEFINED 9 #define SkRecords_DEFINED
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 template <typename T> 144 template <typename T>
145 class PODArray : SkNoncopyable { 145 class PODArray : SkNoncopyable {
146 public: 146 public:
147 PODArray(T* ptr) : fPtr(ptr) {} 147 PODArray(T* ptr) : fPtr(ptr) {}
148 148
149 ACT_AS_PTR(fPtr); 149 ACT_AS_PTR(fPtr);
150 private: 150 private:
151 T* fPtr; 151 T* fPtr;
152 }; 152 };
153 153
154 #undef ACT_AS_PTR
155
154 // Like SkBitmap, but deep copies pixels if they're not immutable. 156 // Like SkBitmap, but deep copies pixels if they're not immutable.
155 // Using this, we guarantee the immutability of all bitmaps we record. 157 // Using this, we guarantee the immutability of all bitmaps we record.
156 class ImmutableBitmap { 158 class ImmutableBitmap {
157 public: 159 public:
158 explicit ImmutableBitmap(const SkBitmap& bitmap) { 160 explicit ImmutableBitmap(const SkBitmap& bitmap) {
159 if (bitmap.isImmutable()) { 161 if (bitmap.isImmutable()) {
160 fBitmap = bitmap; 162 fBitmap = bitmap;
161 } else { 163 } else {
162 bitmap.copyTo(&fBitmap); 164 bitmap.copyTo(&fBitmap);
163 } 165 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 #undef RECORD0 273 #undef RECORD0
272 #undef RECORD1 274 #undef RECORD1
273 #undef RECORD2 275 #undef RECORD2
274 #undef RECORD3 276 #undef RECORD3
275 #undef RECORD4 277 #undef RECORD4
276 #undef RECORD5 278 #undef RECORD5
277 279
278 } // namespace SkRecords 280 } // namespace SkRecords
279 281
280 #endif//SkRecords_DEFINED 282 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « src/record/SkRecordOpts.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698