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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1415 | 1415 |
1416 device_layer_edges.ToFloatArray(edge); | 1416 device_layer_edges.ToFloatArray(edge); |
1417 device_layer_bounds.ToFloatArray(&edge[12]); | 1417 device_layer_bounds.ToFloatArray(&edge[12]); |
1418 | 1418 |
1419 gfx::PointF bottom_right = tile_rect.bottom_right(); | 1419 gfx::PointF bottom_right = tile_rect.bottom_right(); |
1420 gfx::PointF bottom_left = tile_rect.bottom_left(); | 1420 gfx::PointF bottom_left = tile_rect.bottom_left(); |
1421 gfx::PointF top_left = tile_rect.origin(); | 1421 gfx::PointF top_left = tile_rect.origin(); |
1422 gfx::PointF top_right = tile_rect.top_right(); | 1422 gfx::PointF top_right = tile_rect.top_right(); |
1423 | 1423 |
1424 // Map points to device space. | 1424 // Map points to device space. |
1425 bottom_right = MathUtil::MapPoint(device_transform, bottom_right, &clipped); | 1425 bottom_right = MathUtil::MapPoint(device_transform, bottom_right, &clipped); |
danakj
2014/09/26 23:04:34
can you add comment explaining why we are ignoring
| |
1426 DCHECK(!clipped); | |
danakj
2014/09/26 21:09:19
If it's clipped then the coordinates returned by M
| |
1427 bottom_left = MathUtil::MapPoint(device_transform, bottom_left, &clipped); | 1426 bottom_left = MathUtil::MapPoint(device_transform, bottom_left, &clipped); |
1428 DCHECK(!clipped); | |
1429 top_left = MathUtil::MapPoint(device_transform, top_left, &clipped); | 1427 top_left = MathUtil::MapPoint(device_transform, top_left, &clipped); |
1430 DCHECK(!clipped); | |
1431 top_right = MathUtil::MapPoint(device_transform, top_right, &clipped); | 1428 top_right = MathUtil::MapPoint(device_transform, top_right, &clipped); |
1432 DCHECK(!clipped); | |
1433 | 1429 |
1434 LayerQuad::Edge bottom_edge(bottom_right, bottom_left); | 1430 LayerQuad::Edge bottom_edge(bottom_right, bottom_left); |
1435 LayerQuad::Edge left_edge(bottom_left, top_left); | 1431 LayerQuad::Edge left_edge(bottom_left, top_left); |
1436 LayerQuad::Edge top_edge(top_left, top_right); | 1432 LayerQuad::Edge top_edge(top_left, top_right); |
1437 LayerQuad::Edge right_edge(top_right, bottom_right); | 1433 LayerQuad::Edge right_edge(top_right, bottom_right); |
1438 | 1434 |
1439 // Only apply anti-aliasing to edges not clipped by culling or scissoring. | 1435 // Only apply anti-aliasing to edges not clipped by culling or scissoring. |
1440 if (quad->IsTopEdge() && tile_rect.y() == quad->rect.y()) | 1436 if (quad->IsTopEdge() && tile_rect.y() == quad->rect.y()) |
1441 top_edge = device_layer_edges.top(); | 1437 top_edge = device_layer_edges.top(); |
1442 if (quad->IsLeftEdge() && tile_rect.x() == quad->rect.x()) | 1438 if (quad->IsLeftEdge() && tile_rect.x() == quad->rect.x()) |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3202 context_support_->ScheduleOverlayPlane( | 3198 context_support_->ScheduleOverlayPlane( |
3203 overlay.plane_z_order, | 3199 overlay.plane_z_order, |
3204 overlay.transform, | 3200 overlay.transform, |
3205 pending_overlay_resources_.back()->texture_id(), | 3201 pending_overlay_resources_.back()->texture_id(), |
3206 overlay.display_rect, | 3202 overlay.display_rect, |
3207 overlay.uv_rect); | 3203 overlay.uv_rect); |
3208 } | 3204 } |
3209 } | 3205 } |
3210 | 3206 |
3211 } // namespace cc | 3207 } // namespace cc |
OLD | NEW |