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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 #endif | 427 #endif |
428 if (always_clear || frame->current_render_pass->has_transparent_background) { | 428 if (always_clear || frame->current_render_pass->has_transparent_background) { |
429 GLbitfield clear_bits = GL_COLOR_BUFFER_BIT; | 429 GLbitfield clear_bits = GL_COLOR_BUFFER_BIT; |
430 if (always_clear) | 430 if (always_clear) |
431 clear_bits |= GL_STENCIL_BUFFER_BIT; | 431 clear_bits |= GL_STENCIL_BUFFER_BIT; |
432 gl_->Clear(clear_bits); | 432 gl_->Clear(clear_bits); |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) { | 436 void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) { |
437 if (frame->device_viewport_rect.IsEmpty()) | 437 if (false && frame->device_viewport_rect.IsEmpty()) |
438 return; | 438 return; |
439 | 439 |
440 TRACE_EVENT0("cc", "GLRenderer::BeginDrawingFrame"); | 440 TRACE_EVENT0("cc", "GLRenderer::BeginDrawingFrame"); |
441 | 441 |
442 scoped_refptr<ResourceProvider::Fence> read_lock_fence; | 442 scoped_refptr<ResourceProvider::Fence> read_lock_fence; |
443 if (use_sync_query_) { | 443 if (use_sync_query_) { |
444 while (!pending_sync_queries_.empty()) { | 444 while (!pending_sync_queries_.empty()) { |
445 if (pending_sync_queries_.front()->IsPending()) | 445 if (pending_sync_queries_.front()->IsPending()) |
446 break; | 446 break; |
447 | 447 |
(...skipping 2708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3156 context_support_->ScheduleOverlayPlane( | 3156 context_support_->ScheduleOverlayPlane( |
3157 overlay.plane_z_order, | 3157 overlay.plane_z_order, |
3158 overlay.transform, | 3158 overlay.transform, |
3159 pending_overlay_resources_.back()->texture_id(), | 3159 pending_overlay_resources_.back()->texture_id(), |
3160 overlay.display_rect, | 3160 overlay.display_rect, |
3161 overlay.uv_rect); | 3161 overlay.uv_rect); |
3162 } | 3162 } |
3163 } | 3163 } |
3164 | 3164 |
3165 } // namespace cc | 3165 } // namespace cc |
OLD | NEW |