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

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: Created 5 years, 3 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 | « no previous file | cc/output/overlay_candidate.cc » ('j') | cc/output/overlay_candidate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_candidate.h
diff --git a/cc/output/overlay_candidate.h b/cc/output/overlay_candidate.h
index f54a7ddf113c31dbdb5d026827f821528a4e1049..d45ca5e7a47083b929bd0baa4eb38f3e1d70e710 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|'s allow_overlay is true.
+ static bool IsAllowedQuad(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);
@@ -56,6 +60,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;
@@ -71,6 +77,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;
« no previous file with comments | « no previous file | cc/output/overlay_candidate.cc » ('j') | cc/output/overlay_candidate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698