Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Side by Side Diff: cc/output/overlay_strategy_underlay.cc

Issue 1304303002: Mac Overlays: Add sandwich strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@overlay_debug
Patch Set: incorporate review feedback Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/overlay_strategy_underlay.h ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_underlay.h" 5 #include "cc/output/overlay_strategy_underlay.h"
6 6
7 #include "cc/output/overlay_candidate_validator.h" 7 #include "cc/output/overlay_candidate_validator.h"
8 #include "cc/quads/draw_quad.h" 8 #include "cc/quads/draw_quad.h"
9 #include "cc/quads/solid_color_draw_quad.h" 9 #include "cc/quads/solid_color_draw_quad.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 OverlayStrategyUnderlay::OverlayStrategyUnderlay( 13 OverlayStrategyUnderlay::~OverlayStrategyUnderlay() {}
14 OverlayCandidateValidator* capability_checker)
15 : OverlayStrategyCommon(capability_checker) {
16 }
17 14
18 bool OverlayStrategyUnderlay::TryOverlay( 15 bool OverlayStrategyUnderlay::TryOverlay(
19 OverlayCandidateValidator* capability_checker, 16 OverlayCandidateValidator* capability_checker,
20
21 RenderPassList* render_passes_in_draw_order, 17 RenderPassList* render_passes_in_draw_order,
22 OverlayCandidateList* candidate_list, 18 OverlayCandidateList* candidate_list,
23 const OverlayCandidate& candidate, 19 const OverlayCandidate& candidate,
24 QuadList::Iterator candidate_iterator) { 20 QuadList::Iterator candidate_iterator,
21 float device_scale_factor) {
25 RenderPass* root_render_pass = render_passes_in_draw_order->back(); 22 RenderPass* root_render_pass = render_passes_in_draw_order->back();
26 QuadList& quad_list = root_render_pass->quad_list; 23 QuadList& quad_list = root_render_pass->quad_list;
27 24
28 // Add our primary surface. 25 // Add our primary surface.
29 OverlayCandidateList candidates; 26 OverlayCandidateList candidates;
30 OverlayCandidate main_image; 27 OverlayCandidate main_image;
31 main_image.display_rect = root_render_pass->output_rect; 28 main_image.display_rect = root_render_pass->output_rect;
32 candidates.push_back(main_image); 29 candidates.push_back(main_image);
33 30
34 // Add the overlay. 31 // Add the overlay.
(...skipping 14 matching lines...) Expand all
49 candidate_iterator); 46 candidate_iterator);
50 replacement->SetAll(shared_quad_state, rect, rect, rect, false, 47 replacement->SetAll(shared_quad_state, rect, rect, rect, false,
51 SK_ColorTRANSPARENT, true); 48 SK_ColorTRANSPARENT, true);
52 candidate_list->swap(candidates); 49 candidate_list->swap(candidates);
53 return true; 50 return true;
54 } 51 }
55 return false; 52 return false;
56 } 53 }
57 54
58 } // namespace cc 55 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/overlay_strategy_underlay.h ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698