| 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 } | 464 } |
| 465 | 465 |
| 466 static ResourceProvider::ResourceId WaitOnResourceSyncPoints( | 466 static ResourceProvider::ResourceId WaitOnResourceSyncPoints( |
| 467 ResourceProvider* resource_provider, | 467 ResourceProvider* resource_provider, |
| 468 ResourceProvider::ResourceId resource_id) { | 468 ResourceProvider::ResourceId resource_id) { |
| 469 resource_provider->WaitSyncPointIfNeeded(resource_id); | 469 resource_provider->WaitSyncPointIfNeeded(resource_id); |
| 470 return resource_id; | 470 return resource_id; |
| 471 } | 471 } |
| 472 | 472 |
| 473 void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) { | 473 void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) { |
| 474 if (frame->device_viewport_rect.IsEmpty()) | |
| 475 return; | |
| 476 | |
| 477 TRACE_EVENT0("cc", "GLRenderer::BeginDrawingFrame"); | 474 TRACE_EVENT0("cc", "GLRenderer::BeginDrawingFrame"); |
| 478 | 475 |
| 479 scoped_refptr<ResourceProvider::Fence> read_lock_fence; | 476 scoped_refptr<ResourceProvider::Fence> read_lock_fence; |
| 480 if (use_sync_query_) { | 477 if (use_sync_query_) { |
| 481 // Block until oldest sync query has passed if the number of pending queries | 478 // Block until oldest sync query has passed if the number of pending queries |
| 482 // ever reach kMaxPendingSyncQueries. | 479 // ever reach kMaxPendingSyncQueries. |
| 483 if (pending_sync_queries_.size() >= kMaxPendingSyncQueries) { | 480 if (pending_sync_queries_.size() >= kMaxPendingSyncQueries) { |
| 484 LOG(ERROR) << "Reached limit of pending sync queries."; | 481 LOG(ERROR) << "Reached limit of pending sync queries."; |
| 485 | 482 |
| 486 pending_sync_queries_.front()->Wait(); | 483 pending_sync_queries_.front()->Wait(); |
| (...skipping 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3366 context_support_->ScheduleOverlayPlane( | 3363 context_support_->ScheduleOverlayPlane( |
| 3367 overlay.plane_z_order, | 3364 overlay.plane_z_order, |
| 3368 overlay.transform, | 3365 overlay.transform, |
| 3369 pending_overlay_resources_.back()->texture_id(), | 3366 pending_overlay_resources_.back()->texture_id(), |
| 3370 overlay.display_rect, | 3367 overlay.display_rect, |
| 3371 overlay.uv_rect); | 3368 overlay.uv_rect); |
| 3372 } | 3369 } |
| 3373 } | 3370 } |
| 3374 | 3371 |
| 3375 } // namespace cc | 3372 } // namespace cc |
| OLD | NEW |