| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 | 9 |
| 10 #include "SkDraw3D.h" | 10 #include "SkDraw3D.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 SK_MEMBER_ALIAS(location, fCamera.fLocation, 3D_Point), | 37 SK_MEMBER_ALIAS(location, fCamera.fLocation, 3D_Point), |
| 38 SK_MEMBER_ALIAS(observer, fCamera.fObserver, 3D_Point), | 38 SK_MEMBER_ALIAS(observer, fCamera.fObserver, 3D_Point), |
| 39 SK_MEMBER(patch, 3D_Patch), | 39 SK_MEMBER(patch, 3D_Patch), |
| 40 SK_MEMBER_ALIAS(zenith, fCamera.fZenith, 3D_Point), | 40 SK_MEMBER_ALIAS(zenith, fCamera.fZenith, 3D_Point), |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 DEFINE_GET_MEMBER(Sk3D_Camera); | 45 DEFINE_GET_MEMBER(Sk3D_Camera); |
| 46 | 46 |
| 47 Sk3D_Camera::Sk3D_Camera() : hackWidth(0), hackHeight(0), patch(NULL) { | 47 Sk3D_Camera::Sk3D_Camera() : hackWidth(0), hackHeight(0), patch(nullptr) { |
| 48 } | 48 } |
| 49 | 49 |
| 50 Sk3D_Camera::~Sk3D_Camera() { | 50 Sk3D_Camera::~Sk3D_Camera() { |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool Sk3D_Camera::draw(SkAnimateMaker& maker) { | 53 bool Sk3D_Camera::draw(SkAnimateMaker& maker) { |
| 54 fCamera.update(); | 54 fCamera.update(); |
| 55 SkMatrix matrix; | 55 SkMatrix matrix; |
| 56 fCamera.patchToMatrix(patch->fPatch, &matrix); | 56 fCamera.patchToMatrix(patch->fPatch, &matrix); |
| 57 matrix.preTranslate(hackWidth / 2, -hackHeight / 2); | 57 matrix.preTranslate(hackWidth / 2, -hackHeight / 2); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 parameters[1].fOperand.fScalar, parameters[2].fOperand.fScalar); | 97 parameters[1].fOperand.fScalar, parameters[2].fOperand.fScalar); |
| 98 break; | 98 break; |
| 99 default: | 99 default: |
| 100 SkASSERT(0); | 100 SkASSERT(0); |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 | 103 |
| 104 const SkFunctionParamType* Sk3D_Patch::getFunctionsParameters() { | 104 const SkFunctionParamType* Sk3D_Patch::getFunctionsParameters() { |
| 105 return fFunctionParameters; | 105 return fFunctionParameters; |
| 106 } | 106 } |
| OLD | NEW |