1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/plugins/base/android/ANPMatrix.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,164 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "assert.h" 1.10 +#include "ANPBase.h" 1.11 +#include <android/log.h> 1.12 + 1.13 +#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoPlugins" , ## args) 1.14 +#define ASSIGN(obj, name) (obj)->name = anp_matrix_##name 1.15 + 1.16 +/** Return a new identity matrix 1.17 + */ 1.18 +ANPMatrix* 1.19 +anp_matrix_newMatrix() 1.20 +{ 1.21 + NOT_IMPLEMENTED(); 1.22 + return 0; 1.23 +} 1.24 + 1.25 +/** Delete a matrix previously allocated by newMatrix() 1.26 + */ 1.27 +void 1.28 +anp_matrix_deleteMatrix(ANPMatrix*) 1.29 +{ 1.30 + NOT_IMPLEMENTED(); 1.31 +} 1.32 + 1.33 + 1.34 +ANPMatrixFlag 1.35 +anp_matrix_getFlags(const ANPMatrix*) 1.36 +{ 1.37 + NOT_IMPLEMENTED(); 1.38 + return 0; 1.39 +} 1.40 + 1.41 + 1.42 +void 1.43 +anp_matrix_copy(ANPMatrix* dst, const ANPMatrix* src) 1.44 +{ 1.45 + NOT_IMPLEMENTED(); 1.46 +} 1.47 + 1.48 + 1.49 +void 1.50 +anp_matrix_get3x3(const ANPMatrix*, float[9]) 1.51 +{ 1.52 + NOT_IMPLEMENTED(); 1.53 +} 1.54 + 1.55 +void 1.56 +anp_matrix_set3x3(ANPMatrix*, const float[9]) 1.57 +{ 1.58 + NOT_IMPLEMENTED(); 1.59 +} 1.60 + 1.61 + 1.62 +void 1.63 +anp_matrix_setIdentity(ANPMatrix*) 1.64 +{ 1.65 + NOT_IMPLEMENTED(); 1.66 +} 1.67 + 1.68 +void 1.69 +anp_matrix_preTranslate(ANPMatrix*, float tx, float ty) 1.70 +{ 1.71 + NOT_IMPLEMENTED(); 1.72 +} 1.73 + 1.74 +void 1.75 +anp_matrix_postTranslate(ANPMatrix*, float tx, float ty) 1.76 +{ 1.77 + NOT_IMPLEMENTED(); 1.78 +} 1.79 + 1.80 +void 1.81 +anp_matrix_preScale(ANPMatrix*, float sx, float sy) 1.82 +{ 1.83 + NOT_IMPLEMENTED(); 1.84 +} 1.85 + 1.86 +void 1.87 +anp_matrix_postScale(ANPMatrix*, float sx, float sy) 1.88 +{ 1.89 + NOT_IMPLEMENTED(); 1.90 +} 1.91 + 1.92 +void 1.93 +anp_matrix_preSkew(ANPMatrix*, float kx, float ky) 1.94 +{ 1.95 + NOT_IMPLEMENTED(); 1.96 +} 1.97 + 1.98 +void 1.99 +anp_matrix_postSkew(ANPMatrix*, float kx, float ky) 1.100 +{ 1.101 + NOT_IMPLEMENTED(); 1.102 +} 1.103 + 1.104 +void 1.105 +anp_matrix_preRotate(ANPMatrix*, float degrees) 1.106 +{ 1.107 + NOT_IMPLEMENTED(); 1.108 +} 1.109 + 1.110 +void 1.111 +anp_matrix_postRotate(ANPMatrix*, float degrees) 1.112 +{ 1.113 + NOT_IMPLEMENTED(); 1.114 +} 1.115 + 1.116 +void 1.117 +anp_matrix_preConcat(ANPMatrix*, const ANPMatrix*) 1.118 +{ 1.119 + NOT_IMPLEMENTED(); 1.120 +} 1.121 + 1.122 +void 1.123 +anp_matrix_postConcat(ANPMatrix*, const ANPMatrix*) 1.124 +{ 1.125 + NOT_IMPLEMENTED(); 1.126 +} 1.127 + 1.128 + 1.129 +bool 1.130 +anp_matrix_invert(ANPMatrix* dst, const ANPMatrix* src) 1.131 +{ 1.132 + NOT_IMPLEMENTED(); 1.133 + return false; 1.134 +} 1.135 + 1.136 +void 1.137 +anp_matrix_mapPoints(ANPMatrix*, float dst[], const float src[], 1.138 + int32_t count) 1.139 +{ 1.140 + NOT_IMPLEMENTED(); 1.141 +} 1.142 + 1.143 + 1.144 +void InitMatrixInterface(ANPMatrixInterfaceV0 *i) { 1.145 + _assert(i->inSize == sizeof(*i)); 1.146 + ASSIGN(i, newMatrix); 1.147 + ASSIGN(i, deleteMatrix); 1.148 + ASSIGN(i, getFlags); 1.149 + ASSIGN(i, copy); 1.150 + ASSIGN(i, get3x3); 1.151 + ASSIGN(i, set3x3); 1.152 + ASSIGN(i, setIdentity); 1.153 + ASSIGN(i, preTranslate); 1.154 + ASSIGN(i, postTranslate); 1.155 + ASSIGN(i, preScale); 1.156 + ASSIGN(i, postScale); 1.157 + ASSIGN(i, preSkew); 1.158 + ASSIGN(i, postSkew); 1.159 + ASSIGN(i, preRotate); 1.160 + ASSIGN(i, postRotate); 1.161 + ASSIGN(i, preConcat); 1.162 + ASSIGN(i, postConcat); 1.163 + ASSIGN(i, invert); 1.164 + ASSIGN(i, mapPoints); 1.165 +} 1.166 + 1.167 +