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

Side by Side Diff: src/core/SkMipMapLevel.cpp

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fixing bad rebase. Created 5 years, 1 month 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
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698