OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/html/canvas/WebGLRenderingContextBase.h" | 27 #include "core/html/canvas/WebGLRenderingContextBase.h" |
28 | 28 |
29 #include "bindings/core/v8/ExceptionMessages.h" | 29 #include "bindings/core/v8/ExceptionMessages.h" |
30 #include "bindings/core/v8/ExceptionState.h" | 30 #include "bindings/core/v8/ExceptionState.h" |
31 #include "bindings/core/v8/WebGLAny.h" | 31 #include "bindings/core/v8/WebGLAny.h" |
32 #include "core/dom/DOMArrayBuffer.h" | 32 #include "core/dom/DOMArrayBuffer.h" |
33 #include "core/dom/DOMTypedArray.h" | 33 #include "core/dom/DOMTypedArray.h" |
34 #include "core/dom/ExceptionCode.h" | 34 #include "core/dom/ExceptionCode.h" |
| 35 #include "core/dom/FlexibleArrayBufferView.h" |
35 #include "core/fetch/ImageResource.h" | 36 #include "core/fetch/ImageResource.h" |
36 #include "core/frame/LocalFrame.h" | 37 #include "core/frame/LocalFrame.h" |
37 #include "core/frame/Settings.h" | 38 #include "core/frame/Settings.h" |
38 #include "core/html/HTMLCanvasElement.h" | 39 #include "core/html/HTMLCanvasElement.h" |
39 #include "core/html/HTMLImageElement.h" | 40 #include "core/html/HTMLImageElement.h" |
40 #include "core/html/HTMLVideoElement.h" | 41 #include "core/html/HTMLVideoElement.h" |
41 #include "core/html/ImageData.h" | 42 #include "core/html/ImageData.h" |
42 #include "core/html/canvas/ANGLEInstancedArrays.h" | 43 #include "core/html/canvas/ANGLEInstancedArrays.h" |
43 #include "core/html/canvas/CHROMIUMSubscribeUniform.h" | 44 #include "core/html/canvas/CHROMIUMSubscribeUniform.h" |
44 #include "core/html/canvas/CHROMIUMValuebuffer.h" | 45 #include "core/html/canvas/CHROMIUMValuebuffer.h" |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 | 1350 |
1350 void WebGLRenderingContextBase::bufferSubData(GLenum target, long long offset, D
OMArrayBuffer* data) | 1351 void WebGLRenderingContextBase::bufferSubData(GLenum target, long long offset, D
OMArrayBuffer* data) |
1351 { | 1352 { |
1352 if (isContextLost()) | 1353 if (isContextLost()) |
1353 return; | 1354 return; |
1354 if (!data) | 1355 if (!data) |
1355 return; | 1356 return; |
1356 bufferSubDataImpl(target, offset, data->byteLength(), data->data()); | 1357 bufferSubDataImpl(target, offset, data->byteLength(), data->data()); |
1357 } | 1358 } |
1358 | 1359 |
1359 void WebGLRenderingContextBase::bufferSubData(GLenum target, long long offset, D
OMArrayBufferView* data) | 1360 void WebGLRenderingContextBase::bufferSubData(GLenum target, long long offset, c
onst FlexibleArrayBufferView& data) |
1360 { | 1361 { |
1361 if (isContextLost()) | 1362 if (isContextLost()) |
1362 return; | 1363 return; |
1363 if (!data) | 1364 if (!data) |
1364 return; | 1365 return; |
1365 bufferSubDataImpl(target, offset, data->byteLength(), data->baseAddress()); | 1366 bufferSubDataImpl(target, offset, data.byteLength(), data.baseAddress()); |
1366 } | 1367 } |
1367 | 1368 |
1368 GLenum WebGLRenderingContextBase::checkFramebufferStatus(GLenum target) | 1369 GLenum WebGLRenderingContextBase::checkFramebufferStatus(GLenum target) |
1369 { | 1370 { |
1370 if (isContextLost()) | 1371 if (isContextLost()) |
1371 return GL_FRAMEBUFFER_UNSUPPORTED; | 1372 return GL_FRAMEBUFFER_UNSUPPORTED; |
1372 if (target != GL_FRAMEBUFFER) { | 1373 if (target != GL_FRAMEBUFFER) { |
1373 synthesizeGLError(GL_INVALID_ENUM, "checkFramebufferStatus", "invalid ta
rget"); | 1374 synthesizeGLError(GL_INVALID_ENUM, "checkFramebufferStatus", "invalid ta
rget"); |
1374 return 0; | 1375 return 0; |
1375 } | 1376 } |
(...skipping 4717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6093 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 6094 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
6094 } | 6095 } |
6095 #else | 6096 #else |
6096 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6097 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
6097 { | 6098 { |
6098 return m_drawingBuffer.get(); | 6099 return m_drawingBuffer.get(); |
6099 } | 6100 } |
6100 #endif | 6101 #endif |
6101 | 6102 |
6102 } // namespace blink | 6103 } // namespace blink |
OLD | NEW |