| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 m_oesStandardDerivativesSupported = extensions->supports("GL_OES_standard_de
rivatives"); | 114 m_oesStandardDerivativesSupported = extensions->supports("GL_OES_standard_de
rivatives"); |
| 115 if (m_oesStandardDerivativesSupported) | 115 if (m_oesStandardDerivativesSupported) |
| 116 extensions->ensureEnabled("GL_OES_standard_derivatives"); | 116 extensions->ensureEnabled("GL_OES_standard_derivatives"); |
| 117 } | 117 } |
| 118 | 118 |
| 119 SharedGraphicsContext3D::~SharedGraphicsContext3D() | 119 SharedGraphicsContext3D::~SharedGraphicsContext3D() |
| 120 { | 120 { |
| 121 m_context->deleteBuffer(m_quadVertices); | 121 m_context->deleteBuffer(m_quadVertices); |
| 122 allContexts()->remove(this); | 122 allContexts()->remove(this); |
| 123 #if USE(SKIA) | 123 #if USE(SKIA) |
| 124 GrSafeUnref(m_grContext); | 124 if (m_grContext) { |
| 125 m_grContext->contextDestroyed(); |
| 126 GrSafeUnref(m_grContext); |
| 127 } |
| 125 #endif | 128 #endif |
| 126 } | 129 } |
| 127 | 130 |
| 128 void SharedGraphicsContext3D::makeContextCurrent() | 131 void SharedGraphicsContext3D::makeContextCurrent() |
| 129 { | 132 { |
| 130 m_context->makeContextCurrent(); | 133 m_context->makeContextCurrent(); |
| 131 } | 134 } |
| 132 | 135 |
| 133 void SharedGraphicsContext3D::scissor(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3
Dsizei height) | 136 void SharedGraphicsContext3D::scissor(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3
Dsizei height) |
| 134 { | 137 { |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 if (m_grContext) | 489 if (m_grContext) |
| 487 m_grContext->setTextureCacheLimits(maxTextureCacheCount, maxTextureC
acheBytes); | 490 m_grContext->setTextureCacheLimits(maxTextureCacheCount, maxTextureC
acheBytes); |
| 488 } | 491 } |
| 489 return m_grContext; | 492 return m_grContext; |
| 490 } | 493 } |
| 491 #endif | 494 #endif |
| 492 | 495 |
| 493 } // namespace WebCore | 496 } // namespace WebCore |
| 494 | 497 |
| 495 #endif | 498 #endif |
| OLD | NEW |