| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 366 |
| 367 // The updater can access textures while the GLRenderer is using them. | 367 // The updater can access textures while the GLRenderer is using them. |
| 368 capabilities_.allow_partial_texture_updates = true; | 368 capabilities_.allow_partial_texture_updates = true; |
| 369 | 369 |
| 370 capabilities_.using_image = context_caps.gpu.image; | 370 capabilities_.using_image = context_caps.gpu.image; |
| 371 | 371 |
| 372 capabilities_.using_discard_framebuffer = | 372 capabilities_.using_discard_framebuffer = |
| 373 context_caps.gpu.discard_framebuffer; | 373 context_caps.gpu.discard_framebuffer; |
| 374 | 374 |
| 375 capabilities_.allow_rasterize_on_demand = true; | 375 capabilities_.allow_rasterize_on_demand = true; |
| 376 capabilities_.max_msaa_samples = context_caps.gpu.max_samples; | 376 |
| 377 // If MSAA is slow, we want this renderer to behave as though MSAA is not |
| 378 // available. Set samples to 0 to achieve this. |
| 379 if (context_caps.gpu.msaa_is_slow) |
| 380 capabilities_.max_msaa_samples = 0; |
| 381 else |
| 382 capabilities_.max_msaa_samples = context_caps.gpu.max_samples; |
| 377 | 383 |
| 378 use_sync_query_ = context_caps.gpu.sync_query; | 384 use_sync_query_ = context_caps.gpu.sync_query; |
| 379 use_blend_equation_advanced_ = context_caps.gpu.blend_equation_advanced; | 385 use_blend_equation_advanced_ = context_caps.gpu.blend_equation_advanced; |
| 380 use_blend_equation_advanced_coherent_ = | 386 use_blend_equation_advanced_coherent_ = |
| 381 context_caps.gpu.blend_equation_advanced_coherent; | 387 context_caps.gpu.blend_equation_advanced_coherent; |
| 382 | 388 |
| 383 InitializeSharedObjects(); | 389 InitializeSharedObjects(); |
| 384 } | 390 } |
| 385 | 391 |
| 386 GLRenderer::~GLRenderer() { | 392 GLRenderer::~GLRenderer() { |
| (...skipping 3257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3644 texture_id = pending_overlay_resources_.back()->texture_id(); | 3650 texture_id = pending_overlay_resources_.back()->texture_id(); |
| 3645 } | 3651 } |
| 3646 | 3652 |
| 3647 context_support_->ScheduleOverlayPlane( | 3653 context_support_->ScheduleOverlayPlane( |
| 3648 overlay.plane_z_order, overlay.transform, texture_id, | 3654 overlay.plane_z_order, overlay.transform, texture_id, |
| 3649 ToNearestRect(overlay.display_rect), overlay.uv_rect); | 3655 ToNearestRect(overlay.display_rect), overlay.uv_rect); |
| 3650 } | 3656 } |
| 3651 } | 3657 } |
| 3652 | 3658 |
| 3653 } // namespace cc | 3659 } // namespace cc |
| OLD | NEW |