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

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

Issue 2559523002: Send overlay promotion hints from to GLStreamTextureImage. (Closed)
Patch Set: fiddled with GLboolean for windows compiler Created 4 years 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_processor.cc ('k') | cc/resources/resource_provider.h » ('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
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 SolidColorDrawQuad* replacement = 45 SolidColorDrawQuad* replacement =
46 quad_list.ReplaceExistingElement<SolidColorDrawQuad>(it); 46 quad_list.ReplaceExistingElement<SolidColorDrawQuad>(it);
47 replacement->SetAll(shared_quad_state, rect, rect, rect, false, 47 replacement->SetAll(shared_quad_state, rect, rect, rect, false,
48 SK_ColorTRANSPARENT, true); 48 SK_ColorTRANSPARENT, true);
49 candidate_list->swap(new_candidate_list); 49 candidate_list->swap(new_candidate_list);
50 50
51 // This quad will be promoted. We clear the promotable hints here, since 51 // This quad will be promoted. We clear the promotable hints here, since
52 // we can only promote a single quad. Otherwise, somebody might try to 52 // we can only promote a single quad. Otherwise, somebody might try to
53 // back one of the promotable quads with a SurfaceView, and either it or 53 // back one of the promotable quads with a SurfaceView, and either it or
54 // |candidate| would have to fall back to a texture. 54 // |candidate| would have to fall back to a texture.
55 candidate_list->promotable_resource_hints_.clear(); 55 candidate_list->promotion_hint_info_map_.clear();
56 candidate_list->promotable_resource_hints_.insert(candidate.resource_id); 56 candidate_list->AddPromotionHint(candidate);
57 return true; 57 return true;
58 } else { 58 } else {
59 // If |candidate| should get a promotion hint, then rememeber that now. 59 // If |candidate| should get a promotion hint, then rememeber that now.
60 candidate_list->promotable_resource_hints_.insert( 60 candidate_list->promotion_hint_info_map_.insert(
61 new_candidate_list.promotable_resource_hints_.begin(), 61 new_candidate_list.promotion_hint_info_map_.begin(),
62 new_candidate_list.promotable_resource_hints_.end()); 62 new_candidate_list.promotion_hint_info_map_.end());
63 } 63 }
64 } 64 }
65 65
66 return false; 66 return false;
67 } 67 }
68 68
69 } // namespace cc 69 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/overlay_processor.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698