Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package com.android.gallery3d.ui; |
| 18 | |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 19 | import android.graphics.Bitmap; |
George Mount | 64072a0 | 2012-12-11 07:43:51 -0800 | [diff] [blame^] | 20 | import android.graphics.Rect; |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 21 | import android.graphics.RectF; |
| 22 | |
John Reck | a4eae1a | 2012-12-11 14:42:27 -0800 | [diff] [blame] | 23 | import com.android.gallery3d.glrenderer.BasicTexture; |
| 24 | import com.android.gallery3d.glrenderer.GLCanvas; |
| 25 | import com.android.gallery3d.glrenderer.GLPaint; |
| 26 | import com.android.gallery3d.glrenderer.RawTexture; |
| 27 | |
George Mount | 6eb3376 | 2012-11-16 15:44:26 -0800 | [diff] [blame] | 28 | import java.nio.ByteBuffer; |
| 29 | import java.nio.FloatBuffer; |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 30 | |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 31 | import javax.microedition.khronos.opengles.GL11; |
| 32 | |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 33 | public class GLCanvasStub extends GLCanvas { |
| 34 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 35 | public void setSize(int width, int height) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 36 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 37 | public void clearBuffer() {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 38 | @Override |
Bobby Georgescu | 915c2c5 | 2012-08-23 13:05:53 -0700 | [diff] [blame] | 39 | public void clearBuffer(float[] argb) {} |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 40 | public void setCurrentAnimationTimeMillis(long time) {} |
| 41 | public long currentAnimationTimeMillis() { |
| 42 | throw new UnsupportedOperationException(); |
| 43 | } |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 44 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 45 | public void setAlpha(float alpha) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 46 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 47 | public float getAlpha() { |
| 48 | throw new UnsupportedOperationException(); |
| 49 | } |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 50 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 51 | public void multiplyAlpha(float alpha) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 52 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 53 | public void translate(float x, float y, float z) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 54 | @Override |
Chih-Chung Chang | 174cac8 | 2012-02-16 07:27:03 +0800 | [diff] [blame] | 55 | public void translate(float x, float y) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 56 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 57 | public void scale(float sx, float sy, float sz) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 58 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 59 | 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 Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 63 | @Override |
Chih-Chung Chang | cfa105d | 2012-02-18 06:17:18 +0800 | [diff] [blame] | 64 | public void save() { |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 65 | throw new UnsupportedOperationException(); |
| 66 | } |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 67 | @Override |
Chih-Chung Chang | cfa105d | 2012-02-18 06:17:18 +0800 | [diff] [blame] | 68 | public void save(int saveFlags) { |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 69 | throw new UnsupportedOperationException(); |
| 70 | } |
| 71 | public void setBlendEnabled(boolean enabled) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 72 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 73 | public void restore() {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 74 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 75 | public void drawLine(float x1, float y1, float x2, float y2, GLPaint paint) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 76 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 77 | public void drawRect(float x1, float y1, float x2, float y2, GLPaint paint) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 78 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 79 | public void fillRect(float x, float y, float width, float height, int color) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 80 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 81 | public void drawTexture( |
| 82 | BasicTexture texture, int x, int y, int width, int height) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 83 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 84 | 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 Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 88 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 89 | public void drawTexture(BasicTexture texture, RectF source, RectF target) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 90 | @Override |
Chih-Chung Chang | b29a27f | 2012-03-22 17:42:33 +0800 | [diff] [blame] | 91 | public void drawTexture(BasicTexture texture, float[] mTextureTransform, |
| 92 | int x, int y, int w, int h) {} |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 93 | public void drawMixed(BasicTexture from, BasicTexture to, |
| 94 | float ratio, int x, int y, int w, int h) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 95 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 96 | 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 Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 106 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 107 | public boolean unloadTexture(BasicTexture texture) { |
| 108 | throw new UnsupportedOperationException(); |
| 109 | } |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 110 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 111 | public void deleteBuffer(int bufferId) { |
| 112 | throw new UnsupportedOperationException(); |
| 113 | } |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 114 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 115 | public void deleteRecycledResources() {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 116 | @Override |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 117 | public void multiplyMatrix(float[] mMatrix, int offset) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 118 | @Override |
Chih-Chung Chang | 7b83fb8 | 2012-02-22 08:00:31 +0800 | [diff] [blame] | 119 | public void dumpStatisticsAndClear() {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 120 | @Override |
Owen Lin | 8ac2e86 | 2012-04-24 14:08:44 +0800 | [diff] [blame] | 121 | public void beginRenderTarget(RawTexture texture) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 122 | @Override |
Owen Lin | 8ac2e86 | 2012-04-24 14:08:44 +0800 | [diff] [blame] | 123 | public void endRenderTarget() {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 124 | @Override |
Owen Lin | a8f3473 | 2012-10-11 15:08:50 +0800 | [diff] [blame] | 125 | public void drawMixed(BasicTexture from, int toColor, |
| 126 | float ratio, RectF src, RectF target) {} |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 127 | |
| 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 Mount | 6eb3376 | 2012-11-16 15:44:26 -0800 | [diff] [blame] | 142 | public int uploadBuffer(ByteBuffer buffer) { |
| 143 | return 0; |
| 144 | } |
| 145 | @Override |
| 146 | public int uploadBuffer(FloatBuffer buffer) { |
| 147 | return 0; |
George Mount | 7da54d7 | 2012-11-01 10:32:41 -0700 | [diff] [blame] | 148 | } |
| 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 Mount | 6eb3376 | 2012-11-16 15:44:26 -0800 | [diff] [blame] | 167 | @Override |
| 168 | public void initialize(GL11 gl) { |
| 169 | } |
George Mount | 64072a0 | 2012-12-11 07:43:51 -0800 | [diff] [blame^] | 170 | @Override |
| 171 | public void recoverFromLightCycle() { |
| 172 | } |
| 173 | @Override |
| 174 | public void getBounds(Rect bounds, int x, int y, int width, int height) { |
| 175 | } |
Owen Lin | f9a0a43 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 176 | } |