| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "modules/webgl/WebGL2RenderingContextBase.h" | 5 #include "modules/webgl/WebGL2RenderingContextBase.h" |
| 6 | 6 |
| 7 #include "bindings/modules/v8/WebGLAny.h" | 7 #include "bindings/modules/v8/WebGLAny.h" |
| 8 #include "core/frame/ImageBitmap.h" | 8 #include "core/frame/ImageBitmap.h" |
| 9 #include "core/html/HTMLCanvasElement.h" | 9 #include "core/html/HTMLCanvasElement.h" |
| 10 #include "core/html/HTMLImageElement.h" | 10 #include "core/html/HTMLImageElement.h" |
| (...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 { | 1999 { |
| 2000 if (isContextLost()) | 2000 if (isContextLost()) |
| 2001 return nullptr; | 2001 return nullptr; |
| 2002 WebGLTransformFeedback* o = WebGLTransformFeedback::create(this); | 2002 WebGLTransformFeedback* o = WebGLTransformFeedback::create(this); |
| 2003 addSharedObject(o); | 2003 addSharedObject(o); |
| 2004 return o; | 2004 return o; |
| 2005 } | 2005 } |
| 2006 | 2006 |
| 2007 void WebGL2RenderingContextBase::deleteTransformFeedback(WebGLTransformFeedback*
feedback) | 2007 void WebGL2RenderingContextBase::deleteTransformFeedback(WebGLTransformFeedback*
feedback) |
| 2008 { | 2008 { |
| 2009 if (transformFeedbackActive()) { |
| 2010 synthesizeGLError(GL_INVALID_OPERATION, "deleteTransformFeedback", "tran
sform feedback is active"); |
| 2011 return; |
| 2012 } |
| 2009 if (feedback == m_transformFeedbackBinding) | 2013 if (feedback == m_transformFeedbackBinding) |
| 2010 m_transformFeedbackBinding = nullptr; | 2014 m_transformFeedbackBinding = nullptr; |
| 2011 | 2015 |
| 2012 deleteObject(feedback); | 2016 deleteObject(feedback); |
| 2013 } | 2017 } |
| 2014 | 2018 |
| 2015 GLboolean WebGL2RenderingContextBase::isTransformFeedback(WebGLTransformFeedback
* feedback) | 2019 GLboolean WebGL2RenderingContextBase::isTransformFeedback(WebGLTransformFeedback
* feedback) |
| 2016 { | 2020 { |
| 2017 if (isContextLost() || !feedback) | 2021 if (isContextLost() || !feedback) |
| 2018 return 0; | 2022 return 0; |
| (...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3433 params.alignment = m_unpackAlignment; | 3437 params.alignment = m_unpackAlignment; |
| 3434 params.rowLength = m_unpackRowLength; | 3438 params.rowLength = m_unpackRowLength; |
| 3435 params.imageHeight = m_unpackImageHeight; | 3439 params.imageHeight = m_unpackImageHeight; |
| 3436 params.skipPixels = m_unpackSkipPixels; | 3440 params.skipPixels = m_unpackSkipPixels; |
| 3437 params.skipRows = m_unpackSkipRows; | 3441 params.skipRows = m_unpackSkipRows; |
| 3438 params.skipImages = m_unpackSkipImages; | 3442 params.skipImages = m_unpackSkipImages; |
| 3439 return params; | 3443 return params; |
| 3440 } | 3444 } |
| 3441 | 3445 |
| 3442 } // namespace blink | 3446 } // namespace blink |
| OLD | NEW |