summaryrefslogtreecommitdiffstats
path: root/cc/test/test_context_support.h
diff options
context:
space:
mode:
authoralexst@chromium.org <alexst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 20:49:07 +0000
committeralexst@chromium.org <alexst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 20:49:07 +0000
commit8590da360ec53610e51592836443e86065e9e8aa (patch)
treed1ce10ac87bc47100a6e4dbefc29d18c2d54c14d /cc/test/test_context_support.h
parent23dc93ca215537baf312da312ca2a32517e39890 (diff)
downloadchromium_src-8590da360ec53610e51592836443e86065e9e8aa.zip
chromium_src-8590da360ec53610e51592836443e86065e9e8aa.tar.gz
chromium_src-8590da360ec53610e51592836443e86065e9e8aa.tar.bz2
Plumb overlay processing into DirectRenderer.
This change tests for overlays inside DirectRenderer::DrawFrame and if new overlay passes were produced, it skips rendering them and forwards the information to FinishDrawingFrame to allow subclasses like GLRenderer and SoftwareRenderer to schedule overlays in a manner specific to their implementation. GLRenderer schedules overlays via ContextSupport. Adds more tests to ensure overlay quads are not drawn and if no overlays are present, no quads are skipped. BUG= Review URL: https://codereview.chromium.org/208213003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260267 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/test_context_support.h')
-rw-r--r--cc/test/test_context_support.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cc/test/test_context_support.h b/cc/test/test_context_support.h
index 7ae657c1..9fd5d1d 100644
--- a/cc/test/test_context_support.h
+++ b/cc/test/test_context_support.h
@@ -29,6 +29,11 @@ class TestContextSupport : public gpu::ContextSupport {
virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) OVERRIDE;
virtual void SetSwapBuffersCompleteCallback(
const base::Closure& callback) OVERRIDE;
+ virtual void ScheduleOverlayPlane(int plane_z_order,
+ unsigned plane_transform,
+ unsigned overlay_texture_id,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& uv_rect) OVERRIDE;
void CallAllSyncPointCallbacks();
@@ -36,6 +41,15 @@ class TestContextSupport : public gpu::ContextSupport {
void SetSurfaceVisibleCallback(
const SurfaceVisibleCallback& set_visible_callback);
+ typedef base::Callback<void(int plane_z_order,
+ unsigned plane_transform,
+ unsigned overlay_texture_id,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& crop_rect)>
+ ScheduleOverlayPlaneCallback;
+ void SetScheduleOverlayPlaneCallback(
+ const ScheduleOverlayPlaneCallback& schedule_overlay_plane_callback);
+
enum SwapType {
NO_SWAP,
SWAP,
@@ -52,6 +66,7 @@ class TestContextSupport : public gpu::ContextSupport {
std::vector<base::Closure> sync_point_callbacks_;
SurfaceVisibleCallback set_visible_callback_;
+ ScheduleOverlayPlaneCallback schedule_overlay_plane_callback_;
base::Closure swap_buffers_complete_callback_;