epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2006 The Android Open Source Project |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 9 | |
| 10 | #ifndef SkDraw3D_DEFINED |
| 11 | #define SkDraw3D_DEFINED |
| 12 | |
| 13 | #include "SkCamera.h" |
reed | 986ca61 | 2014-11-26 08:50:45 -0800 | [diff] [blame] | 14 | #include "SkADrawable.h" |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 15 | #include "SkMemberInfo.h" |
| 16 | |
| 17 | class Sk3D_Patch; |
| 18 | |
| 19 | struct Sk3D_Point { |
| 20 | DECLARE_NO_VIRTUALS_MEMBER_INFO(3D_Point); |
| 21 | Sk3D_Point(); |
| 22 | private: |
| 23 | SkPoint3D fPoint; |
| 24 | }; |
| 25 | |
reed | 986ca61 | 2014-11-26 08:50:45 -0800 | [diff] [blame] | 26 | class Sk3D_Camera : public SkADrawable { |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 27 | DECLARE_MEMBER_INFO(3D_Camera); |
| 28 | Sk3D_Camera(); |
| 29 | virtual ~Sk3D_Camera(); |
mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 30 | bool draw(SkAnimateMaker& ) SK_OVERRIDE; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 31 | private: |
| 32 | SkScalar hackWidth; |
| 33 | SkScalar hackHeight; |
| 34 | SkCamera3D fCamera; |
| 35 | Sk3D_Patch* patch; |
| 36 | }; |
| 37 | |
| 38 | class Sk3D_Patch : public SkDisplayable { |
| 39 | DECLARE_MEMBER_INFO(3D_Patch); |
| 40 | private: |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 41 | virtual void executeFunction(SkDisplayable* , int index, |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 42 | SkTDArray<SkScriptValue>& parameters, SkDisplayTypes type, |
tfarina | aa458fb | 2015-01-05 17:18:51 -0800 | [diff] [blame] | 43 | SkScriptValue* ) SK_OVERRIDE; |
mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 44 | const SkFunctionParamType* getFunctionsParameters() SK_OVERRIDE; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 45 | SkPatch3D fPatch; |
| 46 | static const SkFunctionParamType fFunctionParameters[]; |
| 47 | friend class Sk3D_Camera; |
| 48 | }; |
| 49 | |
| 50 | #endif // SkDraw3D_DEFINED |