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

Unified Diff: Source/core/rendering/RenderVideo.cpp

Issue 197533013: CompositingReasonFinder should use a virtual function instead of a nest of branches (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing file Created 6 years, 9 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 | « Source/core/rendering/RenderVideo.h ('k') | Source/core/rendering/compositing/CompositingReasonFinder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderVideo.cpp
diff --git a/Source/core/rendering/RenderVideo.cpp b/Source/core/rendering/RenderVideo.cpp
index 1f9d928f6a8d8dc7e21b3f4e5e67c7295cd8b5ed..e6ca53a7d911dad74952f5644a141cb671abadfb 100644
--- a/Source/core/rendering/RenderVideo.cpp
+++ b/Source/core/rendering/RenderVideo.cpp
@@ -276,4 +276,18 @@ LayoutUnit RenderVideo::offsetHeight() const
return RenderMedia::offsetHeight();
}
+CompositingReasons RenderVideo::additionalCompositingReasons(CompositingTriggerFlags triggers) const
+{
+ if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled()) {
+ HTMLMediaElement* media = toHTMLMediaElement(node());
+ if (media->isFullscreen())
+ return CompositingReasonVideo;
+ }
+
+ if ((triggers & VideoTrigger) && shouldDisplayVideo() && supportsAcceleratedRendering())
+ return CompositingReasonVideo;
+
+ return CompositingReasonNone;
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/rendering/RenderVideo.h ('k') | Source/core/rendering/compositing/CompositingReasonFinder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698