| Index: cc/resources/resource_provider.h
|
| diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
|
| index afabed7b8d8fcbc91c4278e70eab31e247cb7edb..a4579f9a8aaef66a131ddab4a0c8ab01ebefb267 100644
|
| --- a/cc/resources/resource_provider.h
|
| +++ b/cc/resources/resource_provider.h
|
| @@ -478,6 +478,13 @@ class CC_EXPORT ResourceProvider
|
| // Indicates if this resource may be used for a hardware overlay plane.
|
| bool IsOverlayCandidate(ResourceId id);
|
|
|
| +#if defined(OS_ANDROID)
|
| + // Indicates if this resource is backed by an Android SurfaceTexture, and thus
|
| + // can't really be promoted to an overlay.
|
| + // TODO(liberato): be sure that this is sent via IPC.
|
| + bool IsBackedBySurfaceTexture(ResourceId id);
|
| +#endif
|
| +
|
| void WaitSyncTokenIfNeeded(ResourceId id);
|
|
|
| static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl);
|
| @@ -581,6 +588,19 @@ class CC_EXPORT ResourceProvider
|
| bool read_lock_fences_enabled : 1;
|
| bool has_shared_bitmap_id : 1;
|
| bool is_overlay_candidate : 1;
|
| +#if defined(OS_ANDROID)
|
| + // Indicates whether this resource may not be overlayed on Android, since
|
| + // it's
|
| + // not backed by a SurfaceView. This may be set in combination with
|
| + // |is_overlay_candidate|, to find out if switching the resource to a
|
| + // a SurfaceView would result in overlay promotion. It's good to find this
|
| + // out in advance, since one has no fallback path for displaying a
|
| + // SurfaceView except via promoting it to an overlay. Ideally, one _could_
|
| + // promote SurfaceTexture via the overlay path, even if one ended up just
|
| + // drawing a quad in the compositor. However, for now, we use this flag to
|
| + // refuse to promote so that the compositor will draw the quad.
|
| + bool is_backed_by_surface_texture : 1;
|
| +#endif
|
| scoped_refptr<Fence> read_lock_fence;
|
| gfx::Size size;
|
| Origin origin;
|
|
|