summaryrefslogtreecommitdiffstats
path: root/cc/quads/io_surface_draw_quad.cc
diff options
context:
space:
mode:
authorandresantoso <andresantoso@chromium.org>2015-08-21 08:30:47 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-21 15:31:13 +0000
commita4d7a8a259296c553cc0a0768af0748bbc6ee343 (patch)
treea53b240aa444b01f3c184c6e0886fb949c42aa3f /cc/quads/io_surface_draw_quad.cc
parent6bc26eb06b0761b5e824b406d1b5d9b6702f1b4c (diff)
downloadchromium_src-a4d7a8a259296c553cc0a0768af0748bbc6ee343.zip
chromium_src-a4d7a8a259296c553cc0a0768af0748bbc6ee343.tar.gz
chromium_src-a4d7a8a259296c553cc0a0768af0748bbc6ee343.tar.bz2
Allow IOSurfaceDrawQuad to be a candidate for overlays
Add allow_overlay field to IOSurfaceDrawQuad, and use it to check whether an IOSurface quad can be an overlay candidate. BUG=510252 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1304533002 Cr-Commit-Position: refs/heads/master@{#344771}
Diffstat (limited to 'cc/quads/io_surface_draw_quad.cc')
-rw-r--r--cc/quads/io_surface_draw_quad.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/cc/quads/io_surface_draw_quad.cc b/cc/quads/io_surface_draw_quad.cc
index 0ad70fc..32e2ffc4 100644
--- a/cc/quads/io_surface_draw_quad.cc
+++ b/cc/quads/io_surface_draw_quad.cc
@@ -11,7 +11,8 @@
namespace cc {
-IOSurfaceDrawQuad::IOSurfaceDrawQuad() : orientation(FLIPPED) {
+IOSurfaceDrawQuad::IOSurfaceDrawQuad()
+ : orientation(FLIPPED), allow_overlay(false) {
}
void IOSurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
@@ -20,7 +21,8 @@ void IOSurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
const gfx::Rect& visible_rect,
const gfx::Size& io_surface_size,
unsigned io_surface_resource_id,
- Orientation orientation) {
+ Orientation orientation,
+ bool allow_overlay) {
bool needs_blending = false;
DrawQuad::SetAll(shared_quad_state, DrawQuad::IO_SURFACE_CONTENT, rect,
opaque_rect, visible_rect, needs_blending);
@@ -28,6 +30,7 @@ void IOSurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
resources.ids[kIOSurfaceResourceIdIndex] = io_surface_resource_id;
resources.count = 1;
this->orientation = orientation;
+ this->allow_overlay = allow_overlay;
}
void IOSurfaceDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
@@ -37,13 +40,15 @@ void IOSurfaceDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
bool needs_blending,
const gfx::Size& io_surface_size,
unsigned io_surface_resource_id,
- Orientation orientation) {
+ Orientation orientation,
+ bool allow_overlay) {
DrawQuad::SetAll(shared_quad_state, DrawQuad::IO_SURFACE_CONTENT, rect,
opaque_rect, visible_rect, needs_blending);
this->io_surface_size = io_surface_size;
resources.ids[kIOSurfaceResourceIdIndex] = io_surface_resource_id;
resources.count = 1;
this->orientation = orientation;
+ this->allow_overlay = allow_overlay;
}
const IOSurfaceDrawQuad* IOSurfaceDrawQuad::MaterialCast(