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

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: move overlay vars out of DrawQuad::Resources 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/output/overlay_candidate_validator.h" 9 #include "cc/output/overlay_candidate_validator.h"
10 #include "cc/quads/draw_quad.h" 10 #include "cc/quads/draw_quad.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 OverlayStrategySingleOnTop::OverlayStrategySingleOnTop( 14 OverlayStrategySingleOnTop::OverlayStrategySingleOnTop(
15 OverlayCandidateValidator* capability_checker, 15 OverlayCandidateValidator* capability_checker)
16 ResourceProvider* resource_provider) 16 : capability_checker_(capability_checker) {
17 : OverlayStrategyCommon(capability_checker, resource_provider) {
18 } 17 }
19 18
20 bool OverlayStrategySingleOnTop::Attempt( 19 bool OverlayStrategySingleOnTop::Attempt(
21 RenderPassList* render_passes_in_draw_order, 20 RenderPassList* render_passes_in_draw_order,
22 OverlayCandidateList* candidate_list) { 21 OverlayCandidateList* candidate_list) {
23 // Only attempt to handle very simple case for now. 22 // Only attempt to handle very simple case for now.
24 if (!capability_checker_) 23 if (!capability_checker_)
25 return false; 24 return false;
26 25
27 RenderPass* root_render_pass = render_passes_in_draw_order->back(); 26 RenderPass* root_render_pass = render_passes_in_draw_order->back();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // If the candidate can be handled by an overlay, create a pass for it. 72 // If the candidate can be handled by an overlay, create a pass for it.
74 if (candidates[1].overlay_handled) { 73 if (candidates[1].overlay_handled) {
75 quad_list.EraseAndInvalidateAllPointers(candidate_iterator); 74 quad_list.EraseAndInvalidateAllPointers(candidate_iterator);
76 candidate_list->swap(candidates); 75 candidate_list->swap(candidates);
77 return true; 76 return true;
78 } 77 }
79 return false; 78 return false;
80 } 79 }
81 80
82 } // namespace cc 81 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698