| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/overlay_strategy_fullscreen.h" | 5 #include "cc/output/overlay_strategy_fullscreen.h" |
| 6 | 6 |
| 7 #include "cc/base/math_util.h" | 7 #include "cc/base/math_util.h" |
| 8 #include "cc/output/overlay_candidate_validator.h" | 8 #include "cc/output/overlay_candidate_validator.h" |
| 9 #include "cc/quads/draw_quad.h" | 9 #include "cc/quads/draw_quad.h" |
| 10 #include "cc/quads/solid_color_draw_quad.h" | 10 #include "cc/quads/solid_color_draw_quad.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 while (front != quad_list->end()) { | 32 while (front != quad_list->end()) { |
| 33 if (!OverlayCandidate::IsInvisibleQuad(*front)) | 33 if (!OverlayCandidate::IsInvisibleQuad(*front)) |
| 34 break; | 34 break; |
| 35 front++; | 35 front++; |
| 36 } | 36 } |
| 37 | 37 |
| 38 if (front == quad_list->end()) | 38 if (front == quad_list->end()) |
| 39 return false; | 39 return false; |
| 40 | 40 |
| 41 const DrawQuad* quad = *front; | 41 const DrawQuad* quad = *front; |
| 42 if (quad->ShouldDrawWithBlending() || | 42 if (quad->ShouldDrawWithBlending()) |
| 43 quad->shared_quad_state->opacity != 1.f || | |
| 44 quad->shared_quad_state->blend_mode != SkBlendMode::kSrcOver) | |
| 45 return false; | 43 return false; |
| 46 | 44 |
| 47 OverlayCandidate candidate; | 45 OverlayCandidate candidate; |
| 48 if (!OverlayCandidate::FromDrawQuad(resource_provider, quad, &candidate)) { | 46 if (!OverlayCandidate::FromDrawQuad(resource_provider, quad, &candidate)) { |
| 49 return false; | 47 return false; |
| 50 } | 48 } |
| 51 | 49 |
| 52 if (candidate.transform != gfx::OVERLAY_TRANSFORM_NONE) { | 50 if (candidate.transform != gfx::OVERLAY_TRANSFORM_NONE) { |
| 53 return false; | 51 return false; |
| 54 } | 52 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 68 if (!new_candidate_list.front().overlay_handled) | 66 if (!new_candidate_list.front().overlay_handled) |
| 69 return false; | 67 return false; |
| 70 | 68 |
| 71 candidate_list->swap(new_candidate_list); | 69 candidate_list->swap(new_candidate_list); |
| 72 | 70 |
| 73 render_pass->quad_list = QuadList(); // Remove all the quads | 71 render_pass->quad_list = QuadList(); // Remove all the quads |
| 74 return true; | 72 return true; |
| 75 } | 73 } |
| 76 | 74 |
| 77 } // namespace cc | 75 } // namespace cc |
| OLD | NEW |