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

Side by Side Diff: components/display_compositor/compositor_overlay_candidate_validator_android.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/display_compositor/compositor_overlay_candidate_validator_a ndroid.h" 5 #include "components/display_compositor/compositor_overlay_candidate_validator_a ndroid.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/output/overlay_processor.h" 10 #include "cc/output/overlay_processor.h"
(...skipping 19 matching lines...) Expand all
30 // There's no check that the presented candidate is really a video frame for 30 // There's no check that the presented candidate is really a video frame for
31 // a fullscreen video. Instead it's assumed that if a quad is marked as 31 // a fullscreen video. Instead it's assumed that if a quad is marked as
32 // overlayable, it's a fullscreen video quad. 32 // overlayable, it's a fullscreen video quad.
33 DCHECK_LE(candidates->size(), 1u); 33 DCHECK_LE(candidates->size(), 1u);
34 34
35 if (!candidates->empty()) { 35 if (!candidates->empty()) {
36 cc::OverlayCandidate& candidate = candidates->front(); 36 cc::OverlayCandidate& candidate = candidates->front();
37 37
38 // This quad either will be promoted, or would be if it were backed by a 38 // This quad either will be promoted, or would be if it were backed by a
39 // SurfaceView. Record that it should get a promotion hint. 39 // SurfaceView. Record that it should get a promotion hint.
40 candidates->promotable_resource_hints_.insert(candidate.resource_id); 40 candidates->AddPromotionHint(candidate);
41 41
42 if (candidate.is_backed_by_surface_texture) { 42 if (candidate.is_backed_by_surface_texture) {
43 // This quad would be promoted if it were backed by a SurfaceView. Since 43 // This quad would be promoted if it were backed by a SurfaceView. Since
44 // it isn't, we can't promote it. 44 // it isn't, we can't promote it.
45 return; 45 return;
46 } 46 }
47 47
48 candidate.display_rect = 48 candidate.display_rect =
49 gfx::RectF(gfx::ToEnclosingRect(candidate.display_rect)); 49 gfx::RectF(gfx::ToEnclosingRect(candidate.display_rect));
50 candidate.overlay_handled = true; 50 candidate.overlay_handled = true;
51 candidate.plane_z_order = -1; 51 candidate.plane_z_order = -1;
52 } 52 }
53 } 53 }
54 54
55 bool CompositorOverlayCandidateValidatorAndroid::AllowCALayerOverlays() { 55 bool CompositorOverlayCandidateValidatorAndroid::AllowCALayerOverlays() {
56 return false; 56 return false;
57 } 57 }
58 58
59 // Overlays will still be allowed when software mirroring is enabled, even 59 // Overlays will still be allowed when software mirroring is enabled, even
60 // though they won't appear in the mirror. 60 // though they won't appear in the mirror.
61 void CompositorOverlayCandidateValidatorAndroid::SetSoftwareMirrorMode( 61 void CompositorOverlayCandidateValidatorAndroid::SetSoftwareMirrorMode(
62 bool enabled) {} 62 bool enabled) {}
63 63
64 } // namespace display_compositor 64 } // namespace display_compositor
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_stream_texture_matrix.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698