Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 | 1 | 
| 2 /* | 2 /* | 
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. | 
| 4 * | 4 * | 
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be | 
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. | 
| 7 */ | 7 */ | 
| 8 | 8 | 
| 9 #ifndef SkLights_DEFINED | 9 #ifndef SkLights_DEFINED | 
| 10 #define SkLights_DEFINED | 10 #define SkLights_DEFINED | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 LightType type() const { return fType; } | 55 LightType type() const { return fType; } | 
| 56 const SkColor3f& color() const { return fColor; } | 56 const SkColor3f& color() const { return fColor; } | 
| 57 const SkVector3& dir() const { | 57 const SkVector3& dir() const { | 
| 58 SkASSERT(kAmbient_LightType != fType); | 58 SkASSERT(kAmbient_LightType != fType); | 
| 59 return fDirection; | 59 return fDirection; | 
| 60 } | 60 } | 
| 61 | 61 | 
| 62 void setShadowMap(sk_sp<SkImage> shadowMap) { | 62 void setShadowMap(sk_sp<SkImage> shadowMap) { | 
| 63 fShadowMap = std::move(shadowMap); | 63 fShadowMap = std::move(shadowMap); | 
| 64 } | 64 } | 
| 65 | 65 | 
| 
 
robertphillips
2016/08/03 18:47:47
For better or for worse, Skia doesn't usually retu
 
vjiaoblack
2016/08/04 13:36:21
Ah. 
That must've been why this change was made,
 
 | |
| 66 SkImage* getShadowMap() const { | 66 sk_sp<SkImage> getShadowMap() const { | 
| 67 return fShadowMap.get(); | 67 return fShadowMap; | 
| 68 } | 68 } | 
| 69 | 69 | 
| 70 Light& operator= (const Light& b) { | 70 Light& operator= (const Light& b) { | 
| 71 if (this == &b) { | 71 if (this == &b) { | 
| 72 return *this; | 72 return *this; | 
| 73 } | 73 } | 
| 74 | 74 | 
| 75 fColor = b.fColor; | 75 fColor = b.fColor; | 
| 76 fType = b.fType; | 76 fType = b.fType; | 
| 77 fDirection = b.fDirection; | 77 fDirection = b.fDirection; | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 | 125 | 
| 126 private: | 126 private: | 
| 127 SkLights() {} | 127 SkLights() {} | 
| 128 | 128 | 
| 129 SkTArray<Light> fLights; | 129 SkTArray<Light> fLights; | 
| 130 | 130 | 
| 131 typedef SkRefCnt INHERITED; | 131 typedef SkRefCnt INHERITED; | 
| 132 }; | 132 }; | 
| 133 | 133 | 
| 134 #endif | 134 #endif | 
| OLD | NEW |