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

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

Issue 1142343008: cc: Rework overlays to not use the ResourceProvider and pass texture size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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_single_on_top.h" 5 #include "cc/output/overlay_strategy_single_on_top.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "cc/quads/draw_quad.h" 9 #include "cc/quads/draw_quad.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 OverlayStrategySingleOnTop::OverlayStrategySingleOnTop( 13 OverlayStrategySingleOnTop::OverlayStrategySingleOnTop(
14 OverlayCandidateValidator* capability_checker, 14 OverlayCandidateValidator* capability_checker)
15 ResourceProvider* resource_provider) 15 : capability_checker_(capability_checker) {
16 : OverlayStrategyCommon(capability_checker, resource_provider) {
17 } 16 }
18 17
19 bool OverlayStrategySingleOnTop::Attempt( 18 bool OverlayStrategySingleOnTop::Attempt(
20 RenderPassList* render_passes_in_draw_order, 19 RenderPassList* render_passes_in_draw_order,
21 OverlayCandidateList* candidate_list) { 20 OverlayCandidateList* candidate_list) {
22 // Only attempt to handle very simple case for now. 21 // Only attempt to handle very simple case for now.
23 if (!capability_checker_) 22 if (!capability_checker_)
24 return false; 23 return false;
25 24
26 RenderPass* root_render_pass = render_passes_in_draw_order->back(); 25 RenderPass* root_render_pass = render_passes_in_draw_order->back();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // If the candidate can be handled by an overlay, create a pass for it. 69 // If the candidate can be handled by an overlay, create a pass for it.
71 if (candidates[1].overlay_handled) { 70 if (candidates[1].overlay_handled) {
72 quad_list.EraseAndInvalidateAllPointers(candidate_iterator); 71 quad_list.EraseAndInvalidateAllPointers(candidate_iterator);
73 candidate_list->swap(candidates); 72 candidate_list->swap(candidates);
74 return true; 73 return true;
75 } 74 }
76 return false; 75 return false;
77 } 76 }
78 77
79 } // namespace cc 78 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698