blob: d6bbc3d237760c75ab43818d4528e02ad41b0326 [file] [log] [blame]
Owen Linf9a0a432011-08-17 22:07:43 +08001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.gallery3d.ui;
18
George Mount7da54d72012-11-01 10:32:41 -070019import android.graphics.Bitmap;
George Mount64072a02012-12-11 07:43:51 -080020import android.graphics.Rect;
Owen Linf9a0a432011-08-17 22:07:43 +080021import android.graphics.RectF;
22
John Recka4eae1a2012-12-11 14:42:27 -080023import com.android.gallery3d.glrenderer.BasicTexture;
24import com.android.gallery3d.glrenderer.GLCanvas;
25import com.android.gallery3d.glrenderer.GLPaint;
26import com.android.gallery3d.glrenderer.RawTexture;
27
George Mount6eb33762012-11-16 15:44:26 -080028import java.nio.ByteBuffer;
29import java.nio.FloatBuffer;
George Mount7da54d72012-11-01 10:32:41 -070030
Owen Linf9a0a432011-08-17 22:07:43 +080031import javax.microedition.khronos.opengles.GL11;
32
George Mount7da54d72012-11-01 10:32:41 -070033public class GLCanvasStub extends GLCanvas {
34 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080035 public void setSize(int width, int height) {}
George Mount7da54d72012-11-01 10:32:41 -070036 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080037 public void clearBuffer() {}
George Mount7da54d72012-11-01 10:32:41 -070038 @Override
Bobby Georgescu915c2c52012-08-23 13:05:53 -070039 public void clearBuffer(float[] argb) {}
Owen Linf9a0a432011-08-17 22:07:43 +080040 public void setCurrentAnimationTimeMillis(long time) {}
41 public long currentAnimationTimeMillis() {
42 throw new UnsupportedOperationException();
43 }
George Mount7da54d72012-11-01 10:32:41 -070044 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080045 public void setAlpha(float alpha) {}
George Mount7da54d72012-11-01 10:32:41 -070046 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080047 public float getAlpha() {
48 throw new UnsupportedOperationException();
49 }
George Mount7da54d72012-11-01 10:32:41 -070050 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080051 public void multiplyAlpha(float alpha) {}
George Mount7da54d72012-11-01 10:32:41 -070052 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080053 public void translate(float x, float y, float z) {}
George Mount7da54d72012-11-01 10:32:41 -070054 @Override
Chih-Chung Chang174cac82012-02-16 07:27:03 +080055 public void translate(float x, float y) {}
George Mount7da54d72012-11-01 10:32:41 -070056 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080057 public void scale(float sx, float sy, float sz) {}
George Mount7da54d72012-11-01 10:32:41 -070058 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080059 public void rotate(float angle, float x, float y, float z) {}
60 public boolean clipRect(int left, int top, int right, int bottom) {
61 throw new UnsupportedOperationException();
62 }
George Mount7da54d72012-11-01 10:32:41 -070063 @Override
Chih-Chung Changcfa105d2012-02-18 06:17:18 +080064 public void save() {
Owen Linf9a0a432011-08-17 22:07:43 +080065 throw new UnsupportedOperationException();
66 }
George Mount7da54d72012-11-01 10:32:41 -070067 @Override
Chih-Chung Changcfa105d2012-02-18 06:17:18 +080068 public void save(int saveFlags) {
Owen Linf9a0a432011-08-17 22:07:43 +080069 throw new UnsupportedOperationException();
70 }
71 public void setBlendEnabled(boolean enabled) {}
George Mount7da54d72012-11-01 10:32:41 -070072 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080073 public void restore() {}
George Mount7da54d72012-11-01 10:32:41 -070074 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080075 public void drawLine(float x1, float y1, float x2, float y2, GLPaint paint) {}
George Mount7da54d72012-11-01 10:32:41 -070076 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080077 public void drawRect(float x1, float y1, float x2, float y2, GLPaint paint) {}
George Mount7da54d72012-11-01 10:32:41 -070078 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080079 public void fillRect(float x, float y, float width, float height, int color) {}
George Mount7da54d72012-11-01 10:32:41 -070080 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080081 public void drawTexture(
82 BasicTexture texture, int x, int y, int width, int height) {}
George Mount7da54d72012-11-01 10:32:41 -070083 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080084 public void drawMesh(BasicTexture tex, int x, int y, int xyBuffer,
85 int uvBuffer, int indexBuffer, int indexCount) {}
86 public void drawTexture(BasicTexture texture,
87 int x, int y, int width, int height, float alpha) {}
George Mount7da54d72012-11-01 10:32:41 -070088 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080089 public void drawTexture(BasicTexture texture, RectF source, RectF target) {}
George Mount7da54d72012-11-01 10:32:41 -070090 @Override
Chih-Chung Changb29a27f2012-03-22 17:42:33 +080091 public void drawTexture(BasicTexture texture, float[] mTextureTransform,
92 int x, int y, int w, int h) {}
Owen Linf9a0a432011-08-17 22:07:43 +080093 public void drawMixed(BasicTexture from, BasicTexture to,
94 float ratio, int x, int y, int w, int h) {}
George Mount7da54d72012-11-01 10:32:41 -070095 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080096 public void drawMixed(BasicTexture from, int to,
97 float ratio, int x, int y, int w, int h) {}
98 public void drawMixed(BasicTexture from, BasicTexture to,
99 float ratio, int x, int y, int width, int height, float alpha) {}
100 public BasicTexture copyTexture(int x, int y, int width, int height) {
101 throw new UnsupportedOperationException();
102 }
103 public GL11 getGLInstance() {
104 throw new UnsupportedOperationException();
105 }
George Mount7da54d72012-11-01 10:32:41 -0700106 @Override
Owen Linf9a0a432011-08-17 22:07:43 +0800107 public boolean unloadTexture(BasicTexture texture) {
108 throw new UnsupportedOperationException();
109 }
George Mount7da54d72012-11-01 10:32:41 -0700110 @Override
Owen Linf9a0a432011-08-17 22:07:43 +0800111 public void deleteBuffer(int bufferId) {
112 throw new UnsupportedOperationException();
113 }
George Mount7da54d72012-11-01 10:32:41 -0700114 @Override
Owen Linf9a0a432011-08-17 22:07:43 +0800115 public void deleteRecycledResources() {}
George Mount7da54d72012-11-01 10:32:41 -0700116 @Override
Owen Linf9a0a432011-08-17 22:07:43 +0800117 public void multiplyMatrix(float[] mMatrix, int offset) {}
George Mount7da54d72012-11-01 10:32:41 -0700118 @Override
Chih-Chung Chang7b83fb82012-02-22 08:00:31 +0800119 public void dumpStatisticsAndClear() {}
George Mount7da54d72012-11-01 10:32:41 -0700120 @Override
Owen Lin8ac2e862012-04-24 14:08:44 +0800121 public void beginRenderTarget(RawTexture texture) {}
George Mount7da54d72012-11-01 10:32:41 -0700122 @Override
Owen Lin8ac2e862012-04-24 14:08:44 +0800123 public void endRenderTarget() {}
George Mount7da54d72012-11-01 10:32:41 -0700124 @Override
Owen Lina8f34732012-10-11 15:08:50 +0800125 public void drawMixed(BasicTexture from, int toColor,
126 float ratio, RectF src, RectF target) {}
George Mount7da54d72012-11-01 10:32:41 -0700127
128 @Override
129 public void setTextureParameters(BasicTexture texture) {
130 }
131 @Override
132 public void initializeTextureSize(BasicTexture texture, int format, int type) {
133 }
134 @Override
135 public void initializeTexture(BasicTexture texture, Bitmap bitmap) {
136 }
137 @Override
138 public void texSubImage2D(BasicTexture texture, int xOffset, int yOffset, Bitmap bitmap,
139 int format, int type) {
140 }
141 @Override
George Mount6eb33762012-11-16 15:44:26 -0800142 public int uploadBuffer(ByteBuffer buffer) {
143 return 0;
144 }
145 @Override
146 public int uploadBuffer(FloatBuffer buffer) {
147 return 0;
George Mount7da54d72012-11-01 10:32:41 -0700148 }
149 @Override
150 public void setBlending(Blending blending) {
151 }
152 @Override
153 public void enableStencil() {
154 }
155 @Override
156 public void disableStencil() {
157 }
158 @Override
159 public void clearStencilBuffer() {
160 }
161 @Override
162 public void updateStencil(boolean update) {
163 }
164 @Override
165 public void drawOnlyOutsideStencil(boolean onlyOutside) {
166 }
George Mount6eb33762012-11-16 15:44:26 -0800167 @Override
168 public void initialize(GL11 gl) {
169 }
George Mount64072a02012-12-11 07:43:51 -0800170 @Override
171 public void recoverFromLightCycle() {
172 }
173 @Override
174 public void getBounds(Rect bounds, int x, int y, int width, int height) {
175 }
Owen Linf9a0a432011-08-17 22:07:43 +0800176}