summaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/gallery3d/ui/GLCanvasStub.java
blob: da4c5c49379d68dd72b8ae40ffd72fa18f0d0789 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
/*
 * Copyright (C) 2010 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.gallery3d.ui;

import android.graphics.Bitmap;
import android.graphics.Rect;
import android.graphics.RectF;

import com.android.gallery3d.glrenderer.BasicTexture;
import com.android.gallery3d.glrenderer.GLCanvas;
import com.android.gallery3d.glrenderer.GLId;
import com.android.gallery3d.glrenderer.GLPaint;
import com.android.gallery3d.glrenderer.RawTexture;

import java.nio.ByteBuffer;
import java.nio.FloatBuffer;

import javax.microedition.khronos.opengles.GL11;

public class GLCanvasStub implements GLCanvas {
    @Override
    public void setSize(int width, int height) {}
    @Override
    public void clearBuffer() {}
    @Override
    public void clearBuffer(float[] argb) {}
    public void setCurrentAnimationTimeMillis(long time) {}
    public long currentAnimationTimeMillis() {
        throw new UnsupportedOperationException();
    }
    @Override
    public void setAlpha(float alpha) {}
    @Override
    public float getAlpha() {
        throw new UnsupportedOperationException();
    }
    @Override
    public void multiplyAlpha(float alpha) {}
    @Override
    public void translate(float x, float y, float z) {}
    @Override
    public void translate(float x, float y) {}
    @Override
    public void scale(float sx, float sy, float sz) {}
    @Override
    public void rotate(float angle, float x, float y, float z) {}
    public boolean clipRect(int left, int top, int right, int bottom) {
        throw new UnsupportedOperationException();
    }
    @Override
    public void save() {
        throw new UnsupportedOperationException();
    }
    @Override
    public void save(int saveFlags) {
        throw new UnsupportedOperationException();
    }
    public void setBlendEnabled(boolean enabled) {}
    @Override
    public void restore() {}
    @Override
    public void drawLine(float x1, float y1, float x2, float y2, GLPaint paint) {}
    @Override
    public void drawRect(float x1, float y1, float x2, float y2, GLPaint paint) {}
    @Override
    public void fillRect(float x, float y, float width, float height, int color) {}
    @Override
    public void drawTexture(
            BasicTexture texture, int x, int y, int width, int height) {}
    @Override
    public void drawMesh(BasicTexture tex, int x, int y, int xyBuffer,
            int uvBuffer, int indexBuffer, int indexCount) {}
    public void drawTexture(BasicTexture texture,
            int x, int y, int width, int height, float alpha) {}
    @Override
    public void drawTexture(BasicTexture texture, RectF source, RectF target) {}
    @Override
    public void drawTexture(BasicTexture texture, float[] mTextureTransform,
            int x, int y, int w, int h) {}
    public void drawMixed(BasicTexture from, BasicTexture to,
            float ratio, int x, int y, int w, int h) {}
    @Override
    public void drawMixed(BasicTexture from, int to,
            float ratio, int x, int y, int w, int h) {}
    public void drawMixed(BasicTexture from, BasicTexture to,
            float ratio, int x, int y, int width, int height, float alpha) {}
    public BasicTexture copyTexture(int x, int y, int width, int height) {
        throw new UnsupportedOperationException();
    }
    public GL11 getGLInstance() {
        throw new UnsupportedOperationException();
    }
    @Override
    public boolean unloadTexture(BasicTexture texture) {
        throw new UnsupportedOperationException();
    }
    @Override
    public void deleteBuffer(int bufferId) {
        throw new UnsupportedOperationException();
    }
    @Override
    public void deleteRecycledResources() {}
    @Override
    public void multiplyMatrix(float[] mMatrix, int offset) {}
    @Override
    public void dumpStatisticsAndClear() {}
    @Override
    public void beginRenderTarget(RawTexture texture) {}
    @Override
    public void endRenderTarget() {}
    @Override
    public void drawMixed(BasicTexture from, int toColor,
            float ratio, RectF src, RectF target) {}

    @Override
    public void setTextureParameters(BasicTexture texture) {
    }
    @Override
    public void initializeTextureSize(BasicTexture texture, int format, int type) {
    }
    @Override
    public void initializeTexture(BasicTexture texture, Bitmap bitmap) {
    }
    @Override
    public void texSubImage2D(BasicTexture texture, int xOffset, int yOffset, Bitmap bitmap,
            int format, int type) {
    }
    @Override
    public int uploadBuffer(ByteBuffer buffer) {
        return 0;
    }
    @Override
    public int uploadBuffer(FloatBuffer buffer) {
        return 0;
    }
    @Override
    public void setBlending(Blending blending) {
    }
    @Override
    public void enableStencil() {
    }
    @Override
    public void disableStencil() {
    }
    @Override
    public void clearStencilBuffer() {
    }
    @Override
    public void updateStencil(boolean update) {
    }
    @Override
    public void drawOnlyOutsideStencil(boolean onlyOutside) {
    }
    @Override
    public void recoverFromLightCycle() {
    }
    @Override
    public void getBounds(Rect bounds, int x, int y, int width, int height) {
    }
    @Override
    public GLId getGLId() {
        return null;
    }
}