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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 device_layer_edges.InflateAntiAliasingDistance(); | 1414 device_layer_edges.InflateAntiAliasingDistance(); |
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. We ignore |clipped|, since the result of |
| 1425 // |MapPoint()| still produces a valid point to draw the quad with. When |
| 1426 // clipped, the point will be outside of the viewport. See crbug.com/416367. |
1425 bottom_right = MathUtil::MapPoint(device_transform, bottom_right, &clipped); | 1427 bottom_right = MathUtil::MapPoint(device_transform, bottom_right, &clipped); |
1426 DCHECK(!clipped); | |
1427 bottom_left = MathUtil::MapPoint(device_transform, bottom_left, &clipped); | 1428 bottom_left = MathUtil::MapPoint(device_transform, bottom_left, &clipped); |
1428 DCHECK(!clipped); | |
1429 top_left = MathUtil::MapPoint(device_transform, top_left, &clipped); | 1429 top_left = MathUtil::MapPoint(device_transform, top_left, &clipped); |
1430 DCHECK(!clipped); | |
1431 top_right = MathUtil::MapPoint(device_transform, top_right, &clipped); | 1430 top_right = MathUtil::MapPoint(device_transform, top_right, &clipped); |
1432 DCHECK(!clipped); | |
1433 | 1431 |
1434 LayerQuad::Edge bottom_edge(bottom_right, bottom_left); | 1432 LayerQuad::Edge bottom_edge(bottom_right, bottom_left); |
1435 LayerQuad::Edge left_edge(bottom_left, top_left); | 1433 LayerQuad::Edge left_edge(bottom_left, top_left); |
1436 LayerQuad::Edge top_edge(top_left, top_right); | 1434 LayerQuad::Edge top_edge(top_left, top_right); |
1437 LayerQuad::Edge right_edge(top_right, bottom_right); | 1435 LayerQuad::Edge right_edge(top_right, bottom_right); |
1438 | 1436 |
1439 // Only apply anti-aliasing to edges not clipped by culling or scissoring. | 1437 // Only apply anti-aliasing to edges not clipped by culling or scissoring. |
1440 if (quad->IsTopEdge() && tile_rect.y() == quad->rect.y()) | 1438 if (quad->IsTopEdge() && tile_rect.y() == quad->rect.y()) |
1441 top_edge = device_layer_edges.top(); | 1439 top_edge = device_layer_edges.top(); |
1442 if (quad->IsLeftEdge() && tile_rect.x() == quad->rect.x()) | 1440 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( | 3200 context_support_->ScheduleOverlayPlane( |
3203 overlay.plane_z_order, | 3201 overlay.plane_z_order, |
3204 overlay.transform, | 3202 overlay.transform, |
3205 pending_overlay_resources_.back()->texture_id(), | 3203 pending_overlay_resources_.back()->texture_id(), |
3206 overlay.display_rect, | 3204 overlay.display_rect, |
3207 overlay.uv_rect); | 3205 overlay.uv_rect); |
3208 } | 3206 } |
3209 } | 3207 } |
3210 | 3208 |
3211 } // namespace cc | 3209 } // namespace cc |
OLD | NEW |