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

Unified Diff: content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc

Issue 1380653003: Mac Overlays: Allow SolidColor and Tile quads to be candidates for overlays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@AllOrNothing2
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc
diff --git a/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc b/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc
index 8fbbc1a73780c89e249741835d55ef42df579547..1929679def3bd8827858cc02bba1605ba5e8ef71 100644
--- a/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc
+++ b/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc
@@ -6,6 +6,7 @@
#include "cc/output/overlay_strategy_single_on_top.h"
#include "cc/output/overlay_strategy_underlay.h"
+#include "cc/quads/texture_draw_quad.h"
#include "ui/ozone/public/overlay_candidates_ozone.h"
namespace content {
@@ -42,6 +43,19 @@ void BrowserCompositorOverlayCandidateValidatorOzone::GetStrategies(
strategies->push_back(make_scoped_ptr(new cc::OverlayStrategyUnderlay(this)));
}
+bool BrowserCompositorOverlayCandidateValidatorOzone::IsSupportedQuad(
+ const cc::DrawQuad* quad) {
+ switch (quad->material) {
+ case cc::DrawQuad::STREAM_VIDEO_CONTENT:
+ return true;
+ case cc::DrawQuad::TEXTURE_CONTENT:
+ return !cc::TextureDrawQuad::MaterialCast(quad)->premultiplied_alpha;
+ default:
+ break;
+ }
+ return false;
+}
+
void BrowserCompositorOverlayCandidateValidatorOzone::CheckOverlaySupport(
cc::OverlayCandidateList* surfaces) {
// SW mirroring copies out of the framebuffer, so we can't remove any
« no previous file with comments | « content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698