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 27 matching lines...) Expand all Loading... |
38 #include "core/frame/Settings.h" | 38 #include "core/frame/Settings.h" |
39 #include "core/html/HTMLCanvasElement.h" | 39 #include "core/html/HTMLCanvasElement.h" |
40 #include "core/html/HTMLImageElement.h" | 40 #include "core/html/HTMLImageElement.h" |
41 #include "core/html/HTMLVideoElement.h" | 41 #include "core/html/HTMLVideoElement.h" |
42 #include "core/html/ImageData.h" | 42 #include "core/html/ImageData.h" |
43 #include "core/inspector/ConsoleMessage.h" | 43 #include "core/inspector/ConsoleMessage.h" |
44 #include "core/inspector/InspectorInstrumentation.h" | 44 #include "core/inspector/InspectorInstrumentation.h" |
45 #include "core/layout/LayoutBox.h" | 45 #include "core/layout/LayoutBox.h" |
46 #include "core/loader/FrameLoader.h" | 46 #include "core/loader/FrameLoader.h" |
47 #include "core/loader/FrameLoaderClient.h" | 47 #include "core/loader/FrameLoaderClient.h" |
| 48 #include "gpu/command_buffer/client/gles2_interface.h" |
48 #include "modules/webgl/ANGLEInstancedArrays.h" | 49 #include "modules/webgl/ANGLEInstancedArrays.h" |
49 #include "modules/webgl/CHROMIUMSubscribeUniform.h" | 50 #include "modules/webgl/CHROMIUMSubscribeUniform.h" |
50 #include "modules/webgl/CHROMIUMValuebuffer.h" | 51 #include "modules/webgl/CHROMIUMValuebuffer.h" |
51 #include "modules/webgl/EXTBlendMinMax.h" | 52 #include "modules/webgl/EXTBlendMinMax.h" |
52 #include "modules/webgl/EXTFragDepth.h" | 53 #include "modules/webgl/EXTFragDepth.h" |
53 #include "modules/webgl/EXTShaderTextureLOD.h" | 54 #include "modules/webgl/EXTShaderTextureLOD.h" |
54 #include "modules/webgl/EXTTextureFilterAnisotropic.h" | 55 #include "modules/webgl/EXTTextureFilterAnisotropic.h" |
55 #include "modules/webgl/OESElementIndexUint.h" | 56 #include "modules/webgl/OESElementIndexUint.h" |
56 #include "modules/webgl/OESStandardDerivatives.h" | 57 #include "modules/webgl/OESStandardDerivatives.h" |
57 #include "modules/webgl/OESTextureFloat.h" | 58 #include "modules/webgl/OESTextureFloat.h" |
(...skipping 5007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5065 void WebGLRenderingContextBase::setFilterQuality(SkFilterQuality filterQuality) | 5066 void WebGLRenderingContextBase::setFilterQuality(SkFilterQuality filterQuality) |
5066 { | 5067 { |
5067 if (!isContextLost() && drawingBuffer()) { | 5068 if (!isContextLost() && drawingBuffer()) { |
5068 drawingBuffer()->setFilterQuality(filterQuality); | 5069 drawingBuffer()->setFilterQuality(filterQuality); |
5069 } | 5070 } |
5070 } | 5071 } |
5071 | 5072 |
5072 Extensions3DUtil* WebGLRenderingContextBase::extensionsUtil() | 5073 Extensions3DUtil* WebGLRenderingContextBase::extensionsUtil() |
5073 { | 5074 { |
5074 if (!m_extensionsUtil) { | 5075 if (!m_extensionsUtil) { |
5075 m_extensionsUtil = Extensions3DUtil::create(webContext()); | 5076 WebGraphicsContext3D* context = webContext(); |
| 5077 gpu::gles2::GLES2Interface* gl = context->getGLES2Interface(); |
| 5078 m_extensionsUtil = Extensions3DUtil::create(context, gl); |
5076 // The only reason the ExtensionsUtil should be invalid is if the webCon
text is lost. | 5079 // The only reason the ExtensionsUtil should be invalid is if the webCon
text is lost. |
5077 ASSERT(m_extensionsUtil->isValid() || webContext()->isContextLost()); | 5080 ASSERT(m_extensionsUtil->isValid() || gl->GetGraphicsResetStatusKHR() !=
GL_NO_ERROR); |
5078 } | 5081 } |
5079 return m_extensionsUtil.get(); | 5082 return m_extensionsUtil.get(); |
5080 } | 5083 } |
5081 | 5084 |
5082 void WebGLRenderingContextBase::removeSharedObject(WebGLSharedObject* object) | 5085 void WebGLRenderingContextBase::removeSharedObject(WebGLSharedObject* object) |
5083 { | 5086 { |
5084 m_contextGroup->removeObject(object); | 5087 m_contextGroup->removeObject(object); |
5085 } | 5088 } |
5086 | 5089 |
5087 void WebGLRenderingContextBase::addSharedObject(WebGLSharedObject* object) | 5090 void WebGLRenderingContextBase::addSharedObject(WebGLSharedObject* object) |
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6285 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); | 6288 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); |
6286 } | 6289 } |
6287 | 6290 |
6288 void WebGLRenderingContextBase::restoreUnpackParameters() | 6291 void WebGLRenderingContextBase::restoreUnpackParameters() |
6289 { | 6292 { |
6290 if (m_unpackAlignment != 1) | 6293 if (m_unpackAlignment != 1) |
6291 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 6294 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
6292 } | 6295 } |
6293 | 6296 |
6294 } // namespace blink | 6297 } // namespace blink |
OLD | NEW |