OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2015 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 |
| 9 #include "SkMipMapLevel.h" |
| 10 |
| 11 SkMipMapLevel::SkMipMapLevel(const void* texels, size_t rowBytes, uint32_t width
, uint32_t height) |
| 12 : fTexels(texels) |
| 13 , fRowBytes(rowBytes) |
| 14 , fWidth(width) |
| 15 , fHeight(height) |
| 16 { |
| 17 } |
| 18 |
| 19 SkMipMapLevel::SkMipMapLevel(SkMipMapLevel&& rhs) |
| 20 : fTexels(rhs.fTexels) |
| 21 , fRowBytes(rhs.fRowBytes) |
| 22 , fWidth(rhs.fWidth) |
| 23 , fHeight(rhs.fHeight) |
| 24 { |
| 25 rhs.fTexels = nullptr; |
| 26 rhs.fRowBytes = 0; |
| 27 rhs.fWidth = 0; |
| 28 rhs.fHeight = 0; |
| 29 } |
| 30 |
| 31 SkMipMapLevel& SkMipMapLevel::operator =(SkMipMapLevel&& rhs) |
| 32 { |
| 33 fTexels = rhs.fTexels; |
| 34 fRowBytes = rhs.fRowBytes; |
| 35 fWidth = rhs.fWidth; |
| 36 fHeight = rhs.fHeight; |
| 37 |
| 38 rhs.fTexels = nullptr; |
| 39 rhs.fRowBytes = 0; |
| 40 rhs.fWidth = 0; |
| 41 rhs.fHeight = 0; |
| 42 |
| 43 return *this; |
| 44 } |
OLD | NEW |