| 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 "cc/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 | 477 |
| 478 GLC(gl_, gl_->LineWidth(quad->width)); | 478 GLC(gl_, gl_->LineWidth(quad->width)); |
| 479 | 479 |
| 480 // The indices for the line are stored in the same array as the triangle | 480 // The indices for the line are stored in the same array as the triangle |
| 481 // indices. | 481 // indices. |
| 482 GLC(gl_, gl_->DrawElements(GL_LINE_LOOP, 4, GL_UNSIGNED_SHORT, 0)); | 482 GLC(gl_, gl_->DrawElements(GL_LINE_LOOP, 4, GL_UNSIGNED_SHORT, 0)); |
| 483 } | 483 } |
| 484 | 484 |
| 485 static SkBitmap ApplyImageFilter(GLRenderer* renderer, | 485 static SkBitmap ApplyImageFilter(GLRenderer* renderer, |
| 486 ContextProvider* offscreen_contexts, | 486 ContextProvider* offscreen_contexts, |
| 487 gfx::Point origin, | 487 const gfx::Point& origin, |
| 488 SkImageFilter* filter, | 488 SkImageFilter* filter, |
| 489 ScopedResource* source_texture_resource) { | 489 ScopedResource* source_texture_resource) { |
| 490 if (!filter) | 490 if (!filter) |
| 491 return SkBitmap(); | 491 return SkBitmap(); |
| 492 | 492 |
| 493 if (!offscreen_contexts || !offscreen_contexts->GrContext()) | 493 if (!offscreen_contexts || !offscreen_contexts->GrContext()) |
| 494 return SkBitmap(); | 494 return SkBitmap(); |
| 495 | 495 |
| 496 ResourceProvider::ScopedWriteLockGL lock(renderer->resource_provider(), | 496 ResourceProvider::ScopedWriteLockGL lock(renderer->resource_provider(), |
| 497 source_texture_resource->id()); | 497 source_texture_resource->id()); |
| (...skipping 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3037 is_scissor_enabled_ = false; | 3037 is_scissor_enabled_ = false; |
| 3038 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); | 3038 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); |
| 3039 scissor_rect_needs_reset_ = true; | 3039 scissor_rect_needs_reset_ = true; |
| 3040 } | 3040 } |
| 3041 | 3041 |
| 3042 bool GLRenderer::IsContextLost() { | 3042 bool GLRenderer::IsContextLost() { |
| 3043 return output_surface_->context_provider()->IsContextLost(); | 3043 return output_surface_->context_provider()->IsContextLost(); |
| 3044 } | 3044 } |
| 3045 | 3045 |
| 3046 } // namespace cc | 3046 } // namespace cc |
| OLD | NEW |