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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
469 | 469 |
470 // TODO(enne): Do we need to reinitialize all of this state per frame? | 470 // TODO(enne): Do we need to reinitialize all of this state per frame? |
471 ReinitializeGLState(); | 471 ReinitializeGLState(); |
472 } | 472 } |
473 | 473 |
474 void GLRenderer::DoNoOp() { | 474 void GLRenderer::DoNoOp() { |
475 GLC(gl_, gl_->BindFramebuffer(GL_FRAMEBUFFER, 0)); | 475 GLC(gl_, gl_->BindFramebuffer(GL_FRAMEBUFFER, 0)); |
476 GLC(gl_, gl_->Flush()); | 476 GLC(gl_, gl_->Flush()); |
477 } | 477 } |
478 | 478 |
479 void GLRenderer::DoPrelockQuad(DrawingFrame* frame, const DrawQuad* quad) { | |
480 switch (quad->material) { | |
481 case DrawQuad::TILED_CONTENT: { | |
482 const TileDrawQuad* q = TileDrawQuad::MaterialCast(quad); | |
483 ResourceProvider::ScopedReadLockGL lock(resource_provider_, | |
enne (OOO)
2014/08/13 00:20:54
I'm not sure that I follow what this is trying to
vmiura
2014/08/13 01:01:32
Yes it's intentional, in this case taking the lock
vmiura
2014/08/13 22:50:39
No longer applicable.
| |
484 q->resource_id); | |
485 } break; | |
486 default: | |
487 break; | |
488 } | |
489 } | |
490 | |
479 void GLRenderer::DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) { | 491 void GLRenderer::DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) { |
480 DCHECK(quad->rect.Contains(quad->visible_rect)); | 492 DCHECK(quad->rect.Contains(quad->visible_rect)); |
481 if (quad->material != DrawQuad::TEXTURE_CONTENT) { | 493 if (quad->material != DrawQuad::TEXTURE_CONTENT) { |
482 FlushTextureQuadCache(); | 494 FlushTextureQuadCache(); |
483 } | 495 } |
484 | 496 |
485 switch (quad->material) { | 497 switch (quad->material) { |
486 case DrawQuad::INVALID: | 498 case DrawQuad::INVALID: |
487 NOTREACHED(); | 499 NOTREACHED(); |
488 break; | 500 break; |
(...skipping 2682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3171 context_support_->ScheduleOverlayPlane( | 3183 context_support_->ScheduleOverlayPlane( |
3172 overlay.plane_z_order, | 3184 overlay.plane_z_order, |
3173 overlay.transform, | 3185 overlay.transform, |
3174 pending_overlay_resources_.back()->texture_id(), | 3186 pending_overlay_resources_.back()->texture_id(), |
3175 overlay.display_rect, | 3187 overlay.display_rect, |
3176 overlay.uv_rect); | 3188 overlay.uv_rect); |
3177 } | 3189 } |
3178 } | 3190 } |
3179 | 3191 |
3180 } // namespace cc | 3192 } // namespace cc |
OLD | NEW |