blob: e9932239b72bfd68467577c6101b1957b114379a [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;
Owen Linf9a0a432011-08-17 22:07:43 +080020import android.graphics.RectF;
21
George Mount6eb33762012-11-16 15:44:26 -080022import java.nio.ByteBuffer;
23import java.nio.FloatBuffer;
George Mount7da54d72012-11-01 10:32:41 -070024
Owen Linf9a0a432011-08-17 22:07:43 +080025import javax.microedition.khronos.opengles.GL11;
26
George Mount7da54d72012-11-01 10:32:41 -070027public class GLCanvasStub extends GLCanvas {
28 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080029 public void setSize(int width, int height) {}
George Mount7da54d72012-11-01 10:32:41 -070030 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080031 public void clearBuffer() {}
George Mount7da54d72012-11-01 10:32:41 -070032 @Override
Bobby Georgescu915c2c52012-08-23 13:05:53 -070033 public void clearBuffer(float[] argb) {}
Owen Linf9a0a432011-08-17 22:07:43 +080034 public void setCurrentAnimationTimeMillis(long time) {}
35 public long currentAnimationTimeMillis() {
36 throw new UnsupportedOperationException();
37 }
George Mount7da54d72012-11-01 10:32:41 -070038 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080039 public void setAlpha(float alpha) {}
George Mount7da54d72012-11-01 10:32:41 -070040 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080041 public float getAlpha() {
42 throw new UnsupportedOperationException();
43 }
George Mount7da54d72012-11-01 10:32:41 -070044 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080045 public void multiplyAlpha(float alpha) {}
George Mount7da54d72012-11-01 10:32:41 -070046 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080047 public void translate(float x, float y, float z) {}
George Mount7da54d72012-11-01 10:32:41 -070048 @Override
Chih-Chung Chang174cac82012-02-16 07:27:03 +080049 public void translate(float x, float y) {}
George Mount7da54d72012-11-01 10:32:41 -070050 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080051 public void scale(float sx, float sy, float sz) {}
George Mount7da54d72012-11-01 10:32:41 -070052 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080053 public void rotate(float angle, float x, float y, float z) {}
54 public boolean clipRect(int left, int top, int right, int bottom) {
55 throw new UnsupportedOperationException();
56 }
George Mount7da54d72012-11-01 10:32:41 -070057 @Override
Chih-Chung Changcfa105d2012-02-18 06:17:18 +080058 public void save() {
Owen Linf9a0a432011-08-17 22:07:43 +080059 throw new UnsupportedOperationException();
60 }
George Mount7da54d72012-11-01 10:32:41 -070061 @Override
Chih-Chung Changcfa105d2012-02-18 06:17:18 +080062 public void save(int saveFlags) {
Owen Linf9a0a432011-08-17 22:07:43 +080063 throw new UnsupportedOperationException();
64 }
65 public void setBlendEnabled(boolean enabled) {}
George Mount7da54d72012-11-01 10:32:41 -070066 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080067 public void restore() {}
George Mount7da54d72012-11-01 10:32:41 -070068 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080069 public void drawLine(float x1, float y1, float x2, float y2, GLPaint paint) {}
George Mount7da54d72012-11-01 10:32:41 -070070 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080071 public void drawRect(float x1, float y1, float x2, float y2, GLPaint paint) {}
George Mount7da54d72012-11-01 10:32:41 -070072 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080073 public void fillRect(float x, float y, float width, float height, int color) {}
George Mount7da54d72012-11-01 10:32:41 -070074 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080075 public void drawTexture(
76 BasicTexture texture, int x, int y, int width, int height) {}
George Mount7da54d72012-11-01 10:32:41 -070077 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080078 public void drawMesh(BasicTexture tex, int x, int y, int xyBuffer,
79 int uvBuffer, int indexBuffer, int indexCount) {}
80 public void drawTexture(BasicTexture texture,
81 int x, int y, int width, int height, float alpha) {}
George Mount7da54d72012-11-01 10:32:41 -070082 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080083 public void drawTexture(BasicTexture texture, RectF source, RectF target) {}
George Mount7da54d72012-11-01 10:32:41 -070084 @Override
Chih-Chung Changb29a27f2012-03-22 17:42:33 +080085 public void drawTexture(BasicTexture texture, float[] mTextureTransform,
86 int x, int y, int w, int h) {}
Owen Linf9a0a432011-08-17 22:07:43 +080087 public void drawMixed(BasicTexture from, BasicTexture to,
88 float ratio, int x, int y, int w, int h) {}
George Mount7da54d72012-11-01 10:32:41 -070089 @Override
Owen Linf9a0a432011-08-17 22:07:43 +080090 public void drawMixed(BasicTexture from, int to,
91 float ratio, int x, int y, int w, int h) {}
92 public void drawMixed(BasicTexture from, BasicTexture to,
93 float ratio, int x, int y, int width, int height, float alpha) {}
94 public BasicTexture copyTexture(int x, int y, int width, int height) {
95 throw new UnsupportedOperationException();
96 }
97 public GL11 getGLInstance() {
98 throw new UnsupportedOperationException();
99 }
George Mount7da54d72012-11-01 10:32:41 -0700100 @Override
Owen Linf9a0a432011-08-17 22:07:43 +0800101 public boolean unloadTexture(BasicTexture texture) {
102 throw new UnsupportedOperationException();
103 }
George Mount7da54d72012-11-01 10:32:41 -0700104 @Override
Owen Linf9a0a432011-08-17 22:07:43 +0800105 public void deleteBuffer(int bufferId) {
106 throw new UnsupportedOperationException();
107 }
George Mount7da54d72012-11-01 10:32:41 -0700108 @Override
Owen Linf9a0a432011-08-17 22:07:43 +0800109 public void deleteRecycledResources() {}
George Mount7da54d72012-11-01 10:32:41 -0700110 @Override
Owen Linf9a0a432011-08-17 22:07:43 +0800111 public void multiplyMatrix(float[] mMatrix, int offset) {}
George Mount7da54d72012-11-01 10:32:41 -0700112 @Override
Chih-Chung Chang7b83fb82012-02-22 08:00:31 +0800113 public void dumpStatisticsAndClear() {}
George Mount7da54d72012-11-01 10:32:41 -0700114 @Override
Owen Lin8ac2e862012-04-24 14:08:44 +0800115 public void beginRenderTarget(RawTexture texture) {}
George Mount7da54d72012-11-01 10:32:41 -0700116 @Override
Owen Lin8ac2e862012-04-24 14:08:44 +0800117 public void endRenderTarget() {}
George Mount7da54d72012-11-01 10:32:41 -0700118 @Override
Owen Lina8f34732012-10-11 15:08:50 +0800119 public void drawMixed(BasicTexture from, int toColor,
120 float ratio, RectF src, RectF target) {}
George Mount7da54d72012-11-01 10:32:41 -0700121
122 @Override
123 public void setTextureParameters(BasicTexture texture) {
124 }
125 @Override
126 public void initializeTextureSize(BasicTexture texture, int format, int type) {
127 }
128 @Override
129 public void initializeTexture(BasicTexture texture, Bitmap bitmap) {
130 }
131 @Override
132 public void texSubImage2D(BasicTexture texture, int xOffset, int yOffset, Bitmap bitmap,
133 int format, int type) {
134 }
135 @Override
George Mount6eb33762012-11-16 15:44:26 -0800136 public int uploadBuffer(ByteBuffer buffer) {
137 return 0;
138 }
139 @Override
140 public int uploadBuffer(FloatBuffer buffer) {
141 return 0;
George Mount7da54d72012-11-01 10:32:41 -0700142 }
143 @Override
144 public void setBlending(Blending blending) {
145 }
146 @Override
147 public void enableStencil() {
148 }
149 @Override
150 public void disableStencil() {
151 }
152 @Override
153 public void clearStencilBuffer() {
154 }
155 @Override
156 public void updateStencil(boolean update) {
157 }
158 @Override
159 public void drawOnlyOutsideStencil(boolean onlyOutside) {
160 }
George Mount6eb33762012-11-16 15:44:26 -0800161 @Override
162 public void initialize(GL11 gl) {
163 }
Owen Linf9a0a432011-08-17 22:07:43 +0800164}