diff options
author | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-26 01:01:07 +0000 |
---|---|---|
committer | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-26 01:01:07 +0000 |
commit | c63b4d4f499671b7f55aa264e823ad521f5d6aae (patch) | |
tree | 36c62254048a0e3f82ac0f003905ae860db1a3cf /chrome/test/gpu | |
parent | 92adf1719ccb5f7734955998006bc22b03210723 (diff) | |
download | chromium_src-c63b4d4f499671b7f55aa264e823ad521f5d6aae.zip chromium_src-c63b4d4f499671b7f55aa264e823ad521f5d6aae.tar.gz chromium_src-c63b4d4f499671b7f55aa264e823ad521f5d6aae.tar.bz2 |
Delete background tab IOSurfaces on Mac.
The deleting part is easy: just handle the AcceleratedSurfaceSuspend call by unrefing the IOSurface.
The hard part is dealing with a NSView drawRect when we don't have the IOSurface (or software BackingStore). To solve this, I reuse the GetBackingStore code to wait for a new frame from the renderer. When the BuffersSwapped message arrives on the IO thread for Mac, an UpdateRect message is synthesized with the SwapBuffers data. The UpdateRect message wakes up the UI thread and allows GetBackingStore to resume.
The accelerated path can have multiple frames in the pipeline, so it is rarely enough to just wait for the next UpdateRect. Instead, the GetBackingStore method is updated to wait up to 40ms to get the correctly-sized frame (whether it's accelerated or software).
The original GetBackingStore code waits for a frame that matches current_size_. However, this CL makes GetBackingStore wait for a frame that matches the view_->GetViewBounds(). current_size_ is equal to the last UpdateRect, which may or may not match GetViewBounds. (Anyone know why the original code doesn't use GetViewBounds?)
This allows us to recover from missing BackingStores or IOSurfaces if the renderer/GPU can produce a new frame within 40ms. We probably want to increase 40 to something like 60 or 100ms though because of the deep GPU pipeline.
In addition, thanks to the blocking GetBackingStore, this fixes some additional bugs:
- no more resize gutter jank on accelerated pages (Mac only for now, but should work on Windows with a followup patch).
- no more white flash while resizing flicker-test2.html.
BUG=117624,58782,85519,124328,106586
Review URL: https://chromiumcodereview.appspot.com/9980016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134033 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/gpu')
-rw-r--r-- | chrome/test/gpu/gpu_pixel_browsertest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/test/gpu/gpu_pixel_browsertest.cc b/chrome/test/gpu/gpu_pixel_browsertest.cc index 7ea66d3..8acbd22 100644 --- a/chrome/test/gpu/gpu_pixel_browsertest.cc +++ b/chrome/test/gpu/gpu_pixel_browsertest.cc @@ -247,7 +247,7 @@ class GpuPixelBrowserTest : public InProcessBrowserTest { const SkBitmap* ref_bmp; bool save_gen = false; - bool save_diff = false; + bool save_diff = true; bool rt = true; if ((ref_img_revision_ <= 0 && !use_checked_in_ref_imgs_) || |