| 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 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2395 } | 2395 } |
| 2396 | 2396 |
| 2397 EnforceMemoryPolicy(); | 2397 EnforceMemoryPolicy(); |
| 2398 } | 2398 } |
| 2399 | 2399 |
| 2400 void GLRenderer::FinishedReadback( | 2400 void GLRenderer::FinishedReadback( |
| 2401 const AsyncGetFramebufferPixelsCleanupCallback& cleanup_callback, | 2401 const AsyncGetFramebufferPixelsCleanupCallback& cleanup_callback, |
| 2402 unsigned source_buffer, | 2402 unsigned source_buffer, |
| 2403 unsigned query, | 2403 unsigned query, |
| 2404 uint8* dest_pixels, | 2404 uint8* dest_pixels, |
| 2405 const gfx::Size& size) { | 2405 gfx::Size size) { |
| 2406 DCHECK(!pending_async_read_pixels_.empty()); | 2406 DCHECK(!pending_async_read_pixels_.empty()); |
| 2407 | 2407 |
| 2408 if (query != 0) { | 2408 if (query != 0) { |
| 2409 GLC(gl_, gl_->DeleteQueriesEXT(1, &query)); | 2409 GLC(gl_, gl_->DeleteQueriesEXT(1, &query)); |
| 2410 } | 2410 } |
| 2411 | 2411 |
| 2412 PendingAsyncReadPixels* current_read = pending_async_read_pixels_.back(); | 2412 PendingAsyncReadPixels* current_read = pending_async_read_pixels_.back(); |
| 2413 // Make sure we service the readbacks in order. | 2413 // Make sure we service the readbacks in order. |
| 2414 DCHECK_EQ(source_buffer, current_read->buffer); | 2414 DCHECK_EQ(source_buffer, current_read->buffer); |
| 2415 | 2415 |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3003 is_scissor_enabled_ = false; | 3003 is_scissor_enabled_ = false; |
| 3004 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); | 3004 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); |
| 3005 scissor_rect_needs_reset_ = true; | 3005 scissor_rect_needs_reset_ = true; |
| 3006 } | 3006 } |
| 3007 | 3007 |
| 3008 bool GLRenderer::IsContextLost() { | 3008 bool GLRenderer::IsContextLost() { |
| 3009 return output_surface_->context_provider()->IsContextLost(); | 3009 return output_surface_->context_provider()->IsContextLost(); |
| 3010 } | 3010 } |
| 3011 | 3011 |
| 3012 } // namespace cc | 3012 } // namespace cc |
| OLD | NEW |