1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/animator/SkDraw3D.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2006 The Android Open Source Project 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 + 1.12 + 1.13 +#ifndef SkDraw3D_DEFINED 1.14 +#define SkDraw3D_DEFINED 1.15 + 1.16 +#include "SkCamera.h" 1.17 +#include "SkDrawable.h" 1.18 +#include "SkMemberInfo.h" 1.19 + 1.20 +class Sk3D_Patch; 1.21 + 1.22 +struct Sk3D_Point { 1.23 + DECLARE_NO_VIRTUALS_MEMBER_INFO(3D_Point); 1.24 + Sk3D_Point(); 1.25 +private: 1.26 + SkPoint3D fPoint; 1.27 +}; 1.28 + 1.29 +class Sk3D_Camera : public SkDrawable { 1.30 + DECLARE_MEMBER_INFO(3D_Camera); 1.31 + Sk3D_Camera(); 1.32 + virtual ~Sk3D_Camera(); 1.33 + virtual bool draw(SkAnimateMaker& ); 1.34 +private: 1.35 + SkScalar hackWidth; 1.36 + SkScalar hackHeight; 1.37 + SkCamera3D fCamera; 1.38 + Sk3D_Patch* patch; 1.39 +}; 1.40 + 1.41 +class Sk3D_Patch : public SkDisplayable { 1.42 + DECLARE_MEMBER_INFO(3D_Patch); 1.43 +private: 1.44 + virtual void executeFunction(SkDisplayable* , int index, 1.45 + SkTDArray<SkScriptValue>& parameters, SkDisplayTypes type, 1.46 + SkScriptValue* ); 1.47 + virtual const SkFunctionParamType* getFunctionsParameters(); 1.48 + SkPatch3D fPatch; 1.49 + static const SkFunctionParamType fFunctionParameters[]; 1.50 + friend class Sk3D_Camera; 1.51 +}; 1.52 + 1.53 +#endif // SkDraw3D_DEFINED