| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "cc/gl_renderer.h" | 7 #include "cc/gl_renderer.h" |
| 8 | 8 |
| 9 #include "FloatQuad.h" | 9 #include "FloatQuad.h" |
| 10 #include "NotImplemented.h" | 10 #include "NotImplemented.h" |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 366 |
| 367 WebGraphicsContext3D* filterContext = getFilterContext(); | 367 WebGraphicsContext3D* filterContext = getFilterContext(); |
| 368 GrContext* filterGrContext = getFilterGrContext(); | 368 GrContext* filterGrContext = getFilterGrContext(); |
| 369 | 369 |
| 370 if (!filterContext || !filterGrContext) | 370 if (!filterContext || !filterGrContext) |
| 371 return SkBitmap(); | 371 return SkBitmap(); |
| 372 | 372 |
| 373 renderer->context()->flush(); | 373 renderer->context()->flush(); |
| 374 | 374 |
| 375 ResourceProvider::ScopedWriteLockGL lock(renderer->resourceProvider(), sourc
eTexture->id()); | 375 ResourceProvider::ScopedWriteLockGL lock(renderer->resourceProvider(), sourc
eTexture->id()); |
| 376 SkBitmap source = RenderSurfaceFilters::apply(filters, lock.textureId(), sou
rceTexture->size(), filterContext, filterGrContext); | 376 SkBitmap source = RenderSurfaceFilters::apply(filters, lock.textureId(), cc:
:IntSize(sourceTexture->size()), filterContext, filterGrContext); |
| 377 return source; | 377 return source; |
| 378 } | 378 } |
| 379 | 379 |
| 380 static SkBitmap applyImageFilter(GLRenderer* renderer, SkImageFilter* filter, Sc
opedTexture* sourceTexture) | 380 static SkBitmap applyImageFilter(GLRenderer* renderer, SkImageFilter* filter, Sc
opedTexture* sourceTexture) |
| 381 { | 381 { |
| 382 if (!filter) | 382 if (!filter) |
| 383 return SkBitmap(); | 383 return SkBitmap(); |
| 384 | 384 |
| 385 WebGraphicsContext3D* context3d = getFilterContext(); | 385 WebGraphicsContext3D* context3d = getFilterContext(); |
| 386 GrContext* grContext = getFilterGrContext(); | 386 GrContext* grContext = getFilterGrContext(); |
| (...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 | 1626 |
| 1627 releaseRenderPassTextures(); | 1627 releaseRenderPassTextures(); |
| 1628 } | 1628 } |
| 1629 | 1629 |
| 1630 bool GLRenderer::isContextLost() | 1630 bool GLRenderer::isContextLost() |
| 1631 { | 1631 { |
| 1632 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); | 1632 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); |
| 1633 } | 1633 } |
| 1634 | 1634 |
| 1635 } // namespace cc | 1635 } // namespace cc |
| OLD | NEW |