| Index: cc/output/overlay_candidate.h
|
| diff --git a/cc/output/overlay_candidate.h b/cc/output/overlay_candidate.h
|
| index aa42ba11f518b9a7f2b2e401f06d0c1cb7b766ce..980c1dc92be4360c6e34d06683445528d63707be 100644
|
| --- a/cc/output/overlay_candidate.h
|
| +++ b/cc/output/overlay_candidate.h
|
| @@ -23,8 +23,10 @@ namespace cc {
|
|
|
| class DrawQuad;
|
| class IOSurfaceDrawQuad;
|
| +class SolidColorDrawQuad;
|
| class StreamVideoDrawQuad;
|
| class TextureDrawQuad;
|
| +class TileDrawQuad;
|
| class ResourceProvider;
|
|
|
| class CC_EXPORT OverlayCandidate {
|
| @@ -58,11 +60,18 @@ class CC_EXPORT OverlayCandidate {
|
| gfx::Rect clip_rect;
|
| // If the quad is clipped after composition.
|
| bool is_clipped;
|
| - // True if the texture for this overlay should be the same one used by the
|
| - // output surface's main overlay.
|
| - bool use_output_surface_for_resource;
|
| - // Texture resource to present in an overlay.
|
| - unsigned resource_id;
|
| +
|
| + enum {
|
| + HAS_RESOURCE, // Use |resource_id| for texture resource.
|
| + USE_OUTPUT_SURFACE, // Use the same texture as the output surface's main
|
| + // overlay.
|
| + SOLID_COLOR, // No resource, use |solid_color|.
|
| + } resource_type;
|
| + union {
|
| + unsigned resource_id; // When resource_type == HAS_RESOURCE.
|
| + SkColor solid_color; // When resource_type == SOLID_COLOR.
|
| + } resource;
|
| +
|
| // Stacking order of the overlay plane relative to the main surface,
|
| // which is 0. Signed to allow for "underlays".
|
| int plane_z_order;
|
| @@ -81,6 +90,11 @@ class CC_EXPORT OverlayCandidate {
|
| static bool FromIOSurfaceQuad(ResourceProvider* resource_provider,
|
| const IOSurfaceDrawQuad* quad,
|
| OverlayCandidate* candidate);
|
| + static bool FromTileQuad(ResourceProvider* resource_provider,
|
| + const TileDrawQuad* quad,
|
| + OverlayCandidate* candidate);
|
| + static bool FromSolidColorQuad(const SolidColorDrawQuad* quad,
|
| + OverlayCandidate* candidate);
|
| };
|
|
|
| typedef std::vector<OverlayCandidate> OverlayCandidateList;
|
|
|