diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-09-13 20:03:59 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-09-20 10:25:16 +0200 |
commit | c42f48817779b4483d1ce6b2dea37b751a165d22 (patch) | |
tree | bde1f6eec20f65e9d9b3caf64e4e7bd80e282e65 | |
parent | 08a4554b7ad1083393e2f136c45fdc5e51c0a62c (diff) |
Only look for streams on primary surface
We currently only support streams there anyway, and the code doesn't
work for offscreen surfaces as is since its only looking at the
destination rect.
-rw-r--r-- | display/rop.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/display/rop.c b/display/rop.c index 66fc4de..6e2a5d9 100644 --- a/display/rop.c +++ b/display/rop.c @@ -500,14 +500,16 @@ static BOOL DoOpaque(PDev *pdev, UINT32 surface_id, RECTL *area, CLIPOBJ *clip, return TRUE; } -static BOOL StreamTest(PDev *pdev, SURFOBJ *src_surf, XLATEOBJ *color_trans, RECTL *src_rect, - RECTL *dest) +static BOOL StreamTest(PDev *pdev, UINT32 surface_id, SURFOBJ *src_surf, + XLATEOBJ *color_trans, RECTL *src_rect, RECTL *dest) { Ring *ring = &pdev->update_trace; UpdateTrace *trace = (UpdateTrace *)ring->next; LONG src_pixmap_pixels = src_surf->sizlBitmap.cx * src_surf->sizlBitmap.cy; - if (src_pixmap_pixels <= 128 * 128) { + if (src_pixmap_pixels <= 128 * 128 || + /* Only handle streams on primary surface */ + surface_id != 0) { return TRUE; } @@ -673,7 +675,7 @@ static BOOL DoCopy(PDev *pdev, UINT32 surface_id, RECTL *area, CLIPOBJ *clip, SU if (mask) { use_cache = TRUE; } else { - use_cache = StreamTest(pdev, src, color_trans, src_rect, area); + use_cache = StreamTest(pdev, surface_id, src, color_trans, src_rect, area); } if (use_cache && TestSplitClips(pdev, src, src_rect, clip, mask) && |