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

Unified Diff: cc/output/overlay_candidate.h

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: Plumb allow_overlay 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
Index: cc/output/overlay_candidate.h
diff --git a/cc/output/overlay_candidate.h b/cc/output/overlay_candidate.h
index 2584d9b0122b548b2554793de4eec2a7766c5ac2..cf499f17a5cd8ed12708d3812d59173e3edcba99 100644
--- a/cc/output/overlay_candidate.h
+++ b/cc/output/overlay_candidate.h
@@ -23,11 +23,15 @@ namespace cc {
class DrawQuad;
class IOSurfaceDrawQuad;
+class SolidColorDrawQuad;
class StreamVideoDrawQuad;
class TextureDrawQuad;
+class TileDrawQuad;
class CC_EXPORT OverlayCandidate {
public:
+ // Returns true if |quad| might contain video.
+ static bool IsVideoQuad(const DrawQuad* quad);
// Returns true and fills in |candidate| if |draw_quad| is of a known quad
// type and contains an overlayable resource.
static bool FromDrawQuad(const DrawQuad* quad, OverlayCandidate* candidate);
@@ -60,6 +64,8 @@ class CC_EXPORT OverlayCandidate {
bool use_output_surface_for_resource;
// Texture resource to present in an overlay.
unsigned resource_id;
+ // If |resource_id| is 0, this overlay is solid color.
+ SkColor solid_color;
// Stacking order of the overlay plane relative to the main surface,
// which is 0. Signed to allow for "underlays".
int plane_z_order;
@@ -75,6 +81,10 @@ class CC_EXPORT OverlayCandidate {
OverlayCandidate* candidate);
static bool FromIOSurfaceQuad(const IOSurfaceDrawQuad* quad,
OverlayCandidate* candidate);
+ static bool FromTileQuad(const TileDrawQuad* quad,
+ OverlayCandidate* candidate);
+ static bool FromSolidColorQuad(const SolidColorDrawQuad* quad,
+ OverlayCandidate* candidate);
};
typedef std::vector<OverlayCandidate> OverlayCandidateList;

Powered by Google App Engine
This is Rietveld 408576698