| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_STUBS_GRAPHICSCONTEXT3D_H_ | 5 // Temporary forwarding header |
| 6 #define CC_STUBS_GRAPHICSCONTEXT3D_H_ | 6 #include "cc/stubs/graphics_context_3d.h" |
| 7 | |
| 8 #include "GraphicsTypes3D.h" | |
| 9 #include "IntSize.h" | |
| 10 #include "third_party/khronos/GLES2/gl2.h" | |
| 11 | |
| 12 #ifdef NO_ERROR | |
| 13 #undef NO_ERROR | |
| 14 #endif | |
| 15 | |
| 16 namespace cc { | |
| 17 | |
| 18 class GraphicsContext3D { | |
| 19 public: | |
| 20 enum SourceDataFormat { SourceFormatRGBA8, SourceFormatBGRA8 }; | |
| 21 static bool computeFormatAndTypeParameters(unsigned, unsigned, unsigned* com
ponentsPerPixel, unsigned* bytesPerComponent); | |
| 22 | |
| 23 enum { | |
| 24 ARRAY_BUFFER = GL_ARRAY_BUFFER, | |
| 25 BLEND = GL_BLEND, | |
| 26 CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE, | |
| 27 COLOR_ATTACHMENT0 = GL_COLOR_ATTACHMENT0, | |
| 28 COLOR_BUFFER_BIT = GL_COLOR_BUFFER_BIT, | |
| 29 COMPILE_STATUS = GL_COMPILE_STATUS, | |
| 30 CULL_FACE = GL_CULL_FACE, | |
| 31 DEPTH_TEST = GL_DEPTH_TEST, | |
| 32 ELEMENT_ARRAY_BUFFER = GL_ELEMENT_ARRAY_BUFFER, | |
| 33 EXTENSIONS = GL_EXTENSIONS, | |
| 34 FLOAT = GL_FLOAT, | |
| 35 FRAGMENT_SHADER = GL_FRAGMENT_SHADER, | |
| 36 FRAMEBUFFER_COMPLETE = GL_FRAMEBUFFER_COMPLETE, | |
| 37 FRAMEBUFFER = GL_FRAMEBUFFER, | |
| 38 INVALID_ENUM = GL_INVALID_ENUM, | |
| 39 INVALID_VALUE = GL_INVALID_VALUE, | |
| 40 LINEAR = GL_LINEAR, | |
| 41 LINE_LOOP = GL_LINE_LOOP , | |
| 42 LINK_STATUS = GL_LINK_STATUS, | |
| 43 LUMINANCE = GL_LUMINANCE, | |
| 44 MAX_TEXTURE_SIZE = GL_MAX_TEXTURE_SIZE, | |
| 45 NEAREST = GL_NEAREST, | |
| 46 NO_ERROR = GL_NO_ERROR, | |
| 47 ONE = GL_ONE, | |
| 48 ONE_MINUS_SRC_ALPHA = GL_ONE_MINUS_SRC_ALPHA, | |
| 49 RGBA = GL_RGBA, | |
| 50 RGB = GL_RGB, | |
| 51 SCISSOR_TEST = GL_SCISSOR_TEST, | |
| 52 SRC_ALPHA = GL_SRC_ALPHA, | |
| 53 STATIC_DRAW = GL_STATIC_DRAW, | |
| 54 TEXTURE0 = GL_TEXTURE0, | |
| 55 TEXTURE1 = GL_TEXTURE1, | |
| 56 TEXTURE_2D = GL_TEXTURE_2D, | |
| 57 TEXTURE2 = GL_TEXTURE2, | |
| 58 TEXTURE3 = GL_TEXTURE3, | |
| 59 TEXTURE_MAG_FILTER = GL_TEXTURE_MAG_FILTER, | |
| 60 TEXTURE_MIN_FILTER = GL_TEXTURE_MIN_FILTER, | |
| 61 TEXTURE_WRAP_S = GL_TEXTURE_WRAP_S, | |
| 62 TEXTURE_WRAP_T = GL_TEXTURE_WRAP_T, | |
| 63 TRIANGLES = GL_TRIANGLES, | |
| 64 TRIANGLE_FAN = GL_TRIANGLE_FAN, | |
| 65 UNSIGNED_BYTE = GL_UNSIGNED_BYTE, | |
| 66 UNSIGNED_SHORT = GL_UNSIGNED_SHORT, | |
| 67 VERTEX_SHADER = GL_VERTEX_SHADER, | |
| 68 ZERO = GL_ZERO, | |
| 69 }; | |
| 70 }; | |
| 71 | |
| 72 } | |
| 73 | |
| 74 #endif // CC_STUBS_GRAPHICSCONTEXT3D_H_ | |
| OLD | NEW |