| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkImage_Base_DEFINED | 8 #ifndef SkImage_Base_DEFINED |
| 9 #define SkImage_Base_DEFINED | 9 #define SkImage_Base_DEFINED |
| 10 | 10 |
| 11 #include "SkImage.h" | 11 #include "SkImage.h" |
| 12 #include "SkSurface.h" | 12 #include "SkSurface.h" |
| 13 | 13 |
| 14 #include <new> |
| 15 |
| 14 enum { | 16 enum { |
| 15 kNeedNewImageUniqueID = 0 | 17 kNeedNewImageUniqueID = 0 |
| 16 }; | 18 }; |
| 17 | 19 |
| 18 static SkSurfaceProps copy_or_safe_defaults(const SkSurfaceProps* props) { | 20 static SkSurfaceProps copy_or_safe_defaults(const SkSurfaceProps* props) { |
| 19 return props ? *props : SkSurfaceProps(0, kUnknown_SkPixelGeometry); | 21 return props ? *props : SkSurfaceProps(0, kUnknown_SkPixelGeometry); |
| 20 } | 22 } |
| 21 | 23 |
| 22 class SkImage_Base : public SkImage { | 24 class SkImage_Base : public SkImage { |
| 23 public: | 25 public: |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 77 |
| 76 static inline SkImage_Base* as_IB(SkImage* image) { | 78 static inline SkImage_Base* as_IB(SkImage* image) { |
| 77 return static_cast<SkImage_Base*>(image); | 79 return static_cast<SkImage_Base*>(image); |
| 78 } | 80 } |
| 79 | 81 |
| 80 static inline const SkImage_Base* as_IB(const SkImage* image) { | 82 static inline const SkImage_Base* as_IB(const SkImage* image) { |
| 81 return static_cast<const SkImage_Base*>(image); | 83 return static_cast<const SkImage_Base*>(image); |
| 82 } | 84 } |
| 83 | 85 |
| 84 #endif | 86 #endif |
| OLD | NEW |