Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 30383002: Merge 159961 "Defer the real work in updateCompositingLayers unt..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1675/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 return String(); 1851 return String();
1852 } 1852 }
1853 1853
1854 String Internals::mainThreadScrollingReasons(Document* document, ExceptionState& es) const 1854 String Internals::mainThreadScrollingReasons(Document* document, ExceptionState& es) const
1855 { 1855 {
1856 if (!document || !document->frame()) { 1856 if (!document || !document->frame()) {
1857 es.throwUninformativeAndGenericDOMException(InvalidAccessError); 1857 es.throwUninformativeAndGenericDOMException(InvalidAccessError);
1858 return String(); 1858 return String();
1859 } 1859 }
1860 1860
1861 // Force a re-layout and a compositing update.
1862 document->updateLayout();
1863 RenderView* view = document->renderView();
1864 if (view->compositor())
1865 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe ferredWork);
1866
1861 Page* page = document->page(); 1867 Page* page = document->page();
1862 if (!page) 1868 if (!page)
1863 return String(); 1869 return String();
1864 1870
1865 return page->mainThreadScrollingReasonsAsText(); 1871 return page->mainThreadScrollingReasonsAsText();
1866 } 1872 }
1867 1873
1868 PassRefPtr<ClientRectList> Internals::nonFastScrollableRects(Document* document, ExceptionState& es) const 1874 PassRefPtr<ClientRectList> Internals::nonFastScrollableRects(Document* document, ExceptionState& es) const
1869 { 1875 {
1870 if (!document || !document->frame()) { 1876 if (!document || !document->frame()) {
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2284 if (!sharedContext) 2290 if (!sharedContext)
2285 return false; 2291 return false;
2286 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); 2292 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB);
2287 // To prevent tests that call loseSharedGraphicsContext3D from being 2293 // To prevent tests that call loseSharedGraphicsContext3D from being
2288 // flaky, we call finish so that the context is guaranteed to be lost 2294 // flaky, we call finish so that the context is guaranteed to be lost
2289 // synchronously (i.e. before returning). 2295 // synchronously (i.e. before returning).
2290 sharedContext->finish(); 2296 sharedContext->finish();
2291 return true; 2297 return true;
2292 } 2298 }
2293 2299
2300 void Internals::forceCompositingUpdate(Document* document, ExceptionState& es)
2301 {
2302 if (!document || !document->renderView()) {
2303 es.throwUninformativeAndGenericDOMException(InvalidAccessError);
2304 return;
2305 }
2306
2307 document->updateLayout();
2308
2309 RenderView* view = document->renderView();
2310 if (view->compositor())
2311 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe ferredWork);
2294 } 2312 }
2313
2314 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698