summaryrefslogtreecommitdiffstats
path: root/cc/raster
Commit message (Collapse)AuthorAgeFilesLines
* Use sk_sp-based picture recording APIsfmalita2016-03-221-2/+1
| | | | | | | | | | | | | | | | 1) use SkPictureRecorder::finishRecordingAsPicture() over endRecordingAsPicture() 2) convert to sk_sp<SkPicture> fields/params where feasible BUG=skia:5077 R=reed@google.com,danakj@chromium.org,enne@chromium.org TBR=pdr@chromium.org,alekseys@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1819683002 Cr-Commit-Position: refs/heads/master@{#382563}
* cc: Refactor SkipImageCanvas and create it during playback.vmpstr2016-03-142-47/+8
| | | | | | | | | | | | | | | This patch moves SkipImageCanvas into a separate file in the same directory as ImageHijackCanvas and also moves the creation of SkipImageCanvas to raster source playback (the same place as ImageHijackCanvas is created). BUG=594679 R=enne, ericrk CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1799883002 Cr-Commit-Position: refs/heads/master@{#381101}
* cc: Fix interchange of red and blue content when using ETC1_RGB8_OES texturesradu.velea2016-03-075-6/+27
| | | | | | | | | | | | | | | | | | Content is swizzled when texture format has different component order than expected format by platform. ETC1 implies the use RGBX layout and should not trigger a swizzle. Updated unittest. TEST=visual inspection with --enable-tile-compression and PlatformColorTest.SameComponentOrder in cc_unittests BUG=570715 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1746763002 Cr-Commit-Position: refs/heads/master@{#379533}
* tracing: Make ConvertableToTraceFormat move-onlyprimiano2016-02-293-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary. This CL: - Makes TraceEvent ownership a move-only scoped_ptr. - Makes ConvertableToTraceFormat (CTTF) itself move-only scoped_ptr. - Updates all the codebase that uses CTTF in TRACE_EVENT macros to use move-only semantics. Background: Historically ConvertableToTraceFormat (CTTF) was RefCounted. The main reason seems to be supporting monitoring mode (now deprecated) where tracing needed to copy TraceEvents without flushing the TraceLog. Not what monitoring mode is gone, there is no reason why TraceEvent(s) should not be move-only. Unfortunately CTTF being RefCounted exposed that implementation detail to its public interface. Fortunately, most of the codebase doesn't care about the fact that CTTF is RefCounted. The only exceptions are: 1. Memory-infra heap profiler {StackFrame,TypeInfo}Deduplicator 2. cc::Layer DebugInfo 1) Is addressed creating a proxy class which delegates the CTTF methods to the duplicators inside MDSessionState. Essentially it makes the CTTF metadata events shared co-owners of the MDSessionState. 2) After an offline chat with danakj@, it seems OK to make DebugInfo(s) moved scoped_ptr (as opposite as copied), moving the ownership to the active layer and keeping a raw ptr into the pending layer. BUG=559117 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=thakis,jochen,tbarzic,mnaganov,skyostil Review URL: https://codereview.chromium.org/1717283003 Cr-Commit-Position: refs/heads/master@{#378263}
* cc: Add out-of-line copy ctors for complex classes.vmpstr2016-02-254-0/+7
| | | | | | | | | | | | | | This patch adds out of line copy constructors for classes that our clang-plugin considers heavy. This is an effort to enable copy constructor checks by default. BUG=436357 R=enne@chromium.org, dcheng@chromium.org, thakis@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1732573002 Cr-Commit-Position: refs/heads/master@{#377462}
* Refactor signaling in RWPericrk2016-02-242-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous patch had moved RasterWorkerPool to make heavy use of broadcast in order to simplify logic a bit. It turns out that broadcast is not ideal in performance critical situations, as it increases lock contention (see https://code.google.com/p/chromium/codesearch#chromium/src/base/synchronization/condition_variable.h&l=34). This change removes all uses of broadcast other than in Shutdown, where performance is less of a concern and we actually need all threads to wake up. To achieve this, we need to re-factor RWP to use: - N foreground threads - 1 background thread rather than N threads which may be able to run foreground/background tasks. In order to ensure that we don't overload the system, this change introduces a limiting system where the background priority thread can only run tasks if no other threads are doing so. BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1666283002 Cr-Commit-Position: refs/heads/master@{#377379}
* cc: Fix TileTaskWorkerPool::PlaybackToMemory trace events.reveman2016-02-241-51/+51
| | | | | | | | | | | | | | | | | | All work done by this function currently ends up in TileTaskWorkerPool::PlaybackToMemory::ConvertPixels. This removes that trace event and adds two new events that more accurately describes the work being done by this function. Trace event only change. No real change in behavior. BUG= TBR=vmpstr@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1725123004 Cr-Commit-Position: refs/heads/master@{#377289}
* Reland Allow one-copy and zero-copy task tile worker pools to use compressed ↵auygun2016-02-227-76/+121
| | | | | | | | | | | textures. BUG=434699 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1713503002 Cr-Commit-Position: refs/heads/master@{#376711}
* Fix resource sync token synchronization issues.dyen2016-02-132-2/+2
| | | | | | | | | | | | | This fixes a resource sync token race condition and also adds some enforcements to the sync token state. R=piman@chromium.org BUG=586409, 584381 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1690223003 Cr-Commit-Position: refs/heads/master@{#375311}
* Revert of Refactor signaling in RWP (patchset #9 id:180001 of ↵skyostil2016-02-122-42/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1666283002/ ) Reason for revert: Broke the thread_times.tough_scrolling_cases test (verified with a local revert): https://build.chromium.org/p/chromium.perf/builders/Linux%20Perf%20%281%29/builds/10247 Original issue's description: > Refactor signaling in RWP > > A previous patch had moved RasterWorkerPool to make heavy use of > broadcast in order to simplify logic a bit. It turns out that broadcast > is not ideal in performance critical situations, as it increases lock > contention (see > https://code.google.com/p/chromium/codesearch#chromium/src/base/synchronization/condition_variable.h&l=34). > > This change removes all uses of broadcast other than in Shutdown, where > performance is less of a concern and we actually need all threads to > wake up. > > To achieve this, we need to re-factor RWP to use: > - N foreground threads > - 1 background thread > rather than N threads which may be able to run foreground/background tasks. > > In order to ensure that we don't overload the system, this change > introduces a limiting system where the background priority thread can only > run tasks if no other threads are doing so. > > BUG= > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=reveman@chromium.org,sievers@chromium.org,avi.rohit@gmail.com,ericrk@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/1690023005 Cr-Commit-Position: refs/heads/master@{#375195}
* cc: Avoid extra flush calls to Skia GrContextkkinnunen2016-02-122-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Avoid calling GrContext::flush() upon every tile raster. The correct way to ensure rendering has been submitted to GPU API level is by "preparing for external io" the render target. This fixes the problem where Skia GPU resource cache resources grow old too quickly. Each flush will age the resources, and after becoming too old (64), the resources will be redundantly destroyed upon the next resource allocation. The flush is intended to be called at the rate the order of frames. Before this fix, the flush was called at least the amount relative to the amount of tiles. For MSAA, flush was called more than one time per tile. This fix reduces the amount of flushes. Also, after this fix the effect of potential extra flushes can be fixed in Skia. BUG=582858 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1653983002 Cr-Commit-Position: refs/heads/master@{#375152}
* Refactor signaling in RWPericrk2016-02-122-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous patch had moved RasterWorkerPool to make heavy use of broadcast in order to simplify logic a bit. It turns out that broadcast is not ideal in performance critical situations, as it increases lock contention (see https://code.google.com/p/chromium/codesearch#chromium/src/base/synchronization/condition_variable.h&l=34). This change removes all uses of broadcast other than in Shutdown, where performance is less of a concern and we actually need all threads to wake up. To achieve this, we need to re-factor RWP to use: - N foreground threads - 1 background thread rather than N threads which may be able to run foreground/background tasks. In order to ensure that we don't overload the system, this change introduces a limiting system where the background priority thread can only run tasks if no other threads are doing so. BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1666283002 Cr-Commit-Position: refs/heads/master@{#375069}
* Add support for 9- and 10-bit h264 videos.hubbe2016-02-091-0/+1
| | | | | | | | | | | | | | | | | Videos are uploaded to GPU using half-floats if supported, otherwise they are downshifted to regular 8-bit textures before uploading. No dithering is done, except for whatever GL_DITHER might do. (Which is probably nothing.) BUG=445071 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/074c4287f2625860b2a9eb437b97f1f1788f8f4b Cr-Commit-Position: refs/heads/master@{#373691} Review URL: https://codereview.chromium.org/1599533002 Cr-Commit-Position: refs/heads/master@{#374221}
* Update task workers to insert their own fence syncs for synchronization.dyen2016-02-063-2/+17
| | | | | | | | | | R=piman@chromium.org BUG=584381 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1675733002 Cr-Commit-Position: refs/heads/master@{#373958}
* Remove a lame assertion from one_copy_tile_task_worker_pool.cc.nick2016-02-051-3/+0
| | | | | | | | | | | | | | | | | This assertion was crashing in practice during renderer shutdown, when SiteDetailsBrowserTest was run under --site-per-process. The crash occurs if the allocation fails. There seems to be an identical assertion a couple lines below, that is correctly guarded against a null pointer. BUG=None TEST=browser_tests CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1674843002 Cr-Commit-Position: refs/heads/master@{#373954}
* Revert of Add support for 9- and 10-bit h264 videos. (patchset #27 of ↵flackr2016-02-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1599533002/ ) Reason for revert: Commit was failing content_browsertests on Mac 10.10: failures: Http/MediaTest.VideoBearHighBitDepthMp4/0 File/MediaTest.VideoBearHighBitDepthMp4/0 First failure: https://build.chromium.org/p/chromium.mac/builders/Mac10.10%20Tests/builds/5222 Original issue's description: > Add support for 9- and 10-bit h264 videos. > > Videos are uploaded to GPU using half-floats if supported, otherwise > they are downshifted to regular 8-bit textures before uploading. No > dithering is done, except for whatever GL_DITHER might do. (Which > is probably nothing.) > > BUG=445071 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/074c4287f2625860b2a9eb437b97f1f1788f8f4b > Cr-Commit-Position: refs/heads/master@{#373691} TBR=fbarchard@chromium.org,erg@chromium.org,reed@chromium.org,piman@chromium.org,danakj@chromium.org,asvitkine@chromium.org,dalecurtis@chromium.org,nasko@chromium.org,fsamuel@chromium.org BUG=445071 NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1674703002 Cr-Commit-Position: refs/heads/master@{#373824}
* Add support for 9- and 10-bit h264 videos.hubbe2016-02-051-0/+1
| | | | | | | | | | | | | | Videos are uploaded to GPU using half-floats if supported, otherwise they are downshifted to regular 8-bit textures before uploading. No dithering is done, except for whatever GL_DITHER might do. (Which is probably nothing.) BUG=445071 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1599533002 Cr-Commit-Position: refs/heads/master@{#373691}
* Switch cc to std::unordered_*.davidben2016-01-282-2/+2
| | | | | | | | | | | | This removes all uses of base::hash_*, BASE_HASH_NAMESPACE, and base::ScopedPtrHashMap in favor of the C++11 versions. BUG=576864, 579229 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1587283002 Cr-Commit-Position: refs/heads/master@{#371937}
* cc: narrow ChromeOS perf workaround to ARMdongseong.hwang2016-01-221-5/+4
| | | | | | | | | | | | | GL_COMMANDS_COMPLETED_CHROMIUM makes EGL_SYNC_PRIOR_COMMANDS_IMPLICIT_EXTERNAL_ARM fence slow down significantly. It's ARM GPU driver issue, which chromium cannot workaround it. BUG=522903, 580166 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1221433002 Cr-Commit-Position: refs/heads/master@{#370935}
* cc: Do solid color analysis before scheduling tiles.sohan.jyoti2016-01-131-6/+2
| | | | | | | | | | | | | Instead of creating separate analysis task in raster thread for solid color detection, we do it while scheduling and rasterization in cc thread itself. This would save us the thread overhead etc. BUG=553612 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1531013004 Cr-Commit-Position: refs/heads/master@{#369263}
* Refactor cc::SkipImageFilter using SkPaintFilterCanvasfmalita2016-01-131-16/+42
| | | | | | | | | | | | | SkDrawFilter is being deprecated. SkPaintFilterCanvas is a helper canvas providing the same functionality. BUG=skia:4782 R=reed@google.com,danakj@chromium.org,enne@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1577973005 Cr-Commit-Position: refs/heads/master@{#369155}
* Add task categories to the task graphericrk2016-01-131-0/+23
| | | | | | | | | | | | | | | | This change assigns one of three possible categories: GPU, HIGH_PRIORITY and LOW_PRIORITY to each task. There will be a follow-up CL which makes RasterWorkerPool respect these categories (rather than just treating them as an additional priority). BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1493703004 Cr-Commit-Position: refs/heads/master@{#369085}
* Remove the "target" argument from CopyTextureChromium.erikchen2016-01-061-4/+3
| | | | | | | | | | | | | | The argument is meaningless, since the function also takes a source_id and dest_id, each of which is already bound to a target. This is a refactor and has no intended behavior change. BUG=533617 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1551143002 Cr-Commit-Position: refs/heads/master@{#367878}
* Switch to standard integer types in cc/.avi2015-12-2128-1/+72
| | | | | | | | | | BUG=138542 TBR=danakj@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1539203002 Cr-Commit-Position: refs/heads/master@{#366333}
* TaskGraphRunner Group supportericrk2015-12-1810-104/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a group to TaskGraphRunner, this can be used by an implementation along with priority in order to decide how to execute tasks. This is a prerequisite patch for thread affinity changes which are coming in a follow-up. This patch causes a moderate (~15%) regression in cc_perftests for TaskGraphRunner. The main regressions I'm seeing are: In ScheduleTasks, we're seeing an additional 3% time spent in operator[] for the two new maps vs ToT. We're also seeing an additional 5.5% of time spent in test code which builds the task graph. Other regressions are less clear, but probably have to do with the additional cost of ScheduleTasks in the function body itself (inlined looping). BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_gn_x64_rel Committed: https://crrev.com/05ca4bc9df381e6345f9cf7ee29cdfa075be30c4 Cr-Commit-Position: refs/heads/master@{#365140} Committed: https://crrev.com/3b4338fc32cf20703baa8066bdad7ce07c5ae696 Cr-Commit-Position: refs/heads/master@{#365646} Review URL: https://codereview.chromium.org/1489233003 Cr-Commit-Position: refs/heads/master@{#366180}
* Revert of Allow one-copy task tile worker pool to use compressed textures. ↵rbyers2015-12-187-123/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #14 id:260001 of https://codereview.chromium.org/1379783002/ ) Reason for revert: Causing perf bot failures - apparently triggers a render crash. http://crbug.com/570477 and possibly http://crbug.com/570809. Please run a perf tryjob including these tests before relanding. Original issue's description: > Allow one-copy and zero-copy task tile worker pools to use compressed textures. > > BUG=434699 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/7d60ce9a132a88ead407a2a58c91edc431e68259 > Cr-Commit-Position: refs/heads/master@{#364326} > > Committed: https://crrev.com/10fc39d36c0ba481056ec91a2984e02fd1127cf4 > Cr-Commit-Position: refs/heads/master@{#364484} TBR=reveman@chromium.org,nyquist@chromium.org,piman@chromium.org,sievers@chromium.org,christiank@opera.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=434699 Review URL: https://codereview.chromium.org/1535953003 Cr-Commit-Position: refs/heads/master@{#366101}
* Convert Pass()→std::move() in cc/dcheng2015-12-181-2/+3
| | | | | | | | | BUG=557422 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1540503002 Cr-Commit-Position: refs/heads/master@{#366046}
* Revert of TaskGraphRunner Group support (patchset #12 id:360001 of ↵yutak2015-12-1710-236/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1489233003/ ) Reason for revert: Broke compile on Win x64 GN https://build.chromium.org/p/chromium.win/builders/Win%20x64%20GN/builds/9223 Original issue's description: > TaskGraphRunner Group support > > Adds a group to TaskGraphRunner, this can be used by an > implementation along with priority in order to decide how to execute > tasks. > > This is a prerequisite patch for thread affinity changes which are > coming in a follow-up. > > This patch causes a moderate (~15%) regression in cc_perftests for TaskGraphRunner. > > The main regressions I'm seeing are: > > In ScheduleTasks, we're seeing an additional 3% time spent in operator[] for the two new maps vs ToT. > > We're also seeing an additional 5.5% of time spent in test code which builds the task graph. > > Other regressions are less clear, but probably have to do with the additional cost of ScheduleTasks in the function body itself (inlined looping). > > BUG= > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/05ca4bc9df381e6345f9cf7ee29cdfa075be30c4 > Cr-Commit-Position: refs/heads/master@{#365140} > > Committed: https://crrev.com/3b4338fc32cf20703baa8066bdad7ce07c5ae696 > Cr-Commit-Position: refs/heads/master@{#365646} TBR=haraken@chromium.org,oilpan-reviews@chromium.org,reveman@chromium.org,sievers@chromium.org,ericrk@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/1538433002 Cr-Commit-Position: refs/heads/master@{#365745}
* TaskGraphRunner Group supportericrk2015-12-1610-102/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a group to TaskGraphRunner, this can be used by an implementation along with priority in order to decide how to execute tasks. This is a prerequisite patch for thread affinity changes which are coming in a follow-up. This patch causes a moderate (~15%) regression in cc_perftests for TaskGraphRunner. The main regressions I'm seeing are: In ScheduleTasks, we're seeing an additional 3% time spent in operator[] for the two new maps vs ToT. We're also seeing an additional 5.5% of time spent in test code which builds the task graph. Other regressions are less clear, but probably have to do with the additional cost of ScheduleTasks in the function body itself (inlined looping). BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/05ca4bc9df381e6345f9cf7ee29cdfa075be30c4 Cr-Commit-Position: refs/heads/master@{#365140} Review URL: https://codereview.chromium.org/1489233003 Cr-Commit-Position: refs/heads/master@{#365646}
* Revert of TaskGraphRunner Group support (patchset #11 id:340001 of ↵yoichio2015-12-1510-234/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1489233003/ ) Reason for revert: This might cause test failure on SynchronousTaskGraphRunner/SingleThreadTaskGraphRunnerTest/ http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=SynchronousTaskGraphRunner%2FSingleThreadTaskGraphRunnerTest%2F0.Priority&testType=cc_unittests Original issue's description: > TaskGraphRunner Group support > > Adds a group to TaskGraphRunner, this can be used by an > implementation along with priority in order to decide how to execute > tasks. > > This is a prerequisite patch for thread affinity changes which are > coming in a follow-up. > > This patch causes a moderate (~15%) regression in cc_perftests for TaskGraphRunner. > > The main regressions I'm seeing are: > > In ScheduleTasks, we're seeing an additional 3% time spent in operator[] for the two new maps vs ToT. > > We're also seeing an additional 5.5% of time spent in test code which builds the task graph. > > Other regressions are less clear, but probably have to do with the additional cost of ScheduleTasks in the function body itself (inlined looping). > > BUG= > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/05ca4bc9df381e6345f9cf7ee29cdfa075be30c4 > Cr-Commit-Position: refs/heads/master@{#365140} TBR=reveman@chromium.org,sievers@chromium.org,ericrk@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/1521423003 Cr-Commit-Position: refs/heads/master@{#365147}
* TaskGraphRunner Group supportericrk2015-12-1510-100/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds a group to TaskGraphRunner, this can be used by an implementation along with priority in order to decide how to execute tasks. This is a prerequisite patch for thread affinity changes which are coming in a follow-up. This patch causes a moderate (~15%) regression in cc_perftests for TaskGraphRunner. The main regressions I'm seeing are: In ScheduleTasks, we're seeing an additional 3% time spent in operator[] for the two new maps vs ToT. We're also seeing an additional 5.5% of time spent in test code which builds the task graph. Other regressions are less clear, but probably have to do with the additional cost of ScheduleTasks in the function body itself (inlined looping). BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1489233003 Cr-Commit-Position: refs/heads/master@{#365140}
* Allow one-copy and zero-copy task tile worker pools to use compressed textures.christiank2015-12-107-79/+123
| | | | | | | | | | | | BUG=434699 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/7d60ce9a132a88ead407a2a58c91edc431e68259 Cr-Commit-Position: refs/heads/master@{#364326} Review URL: https://codereview.chromium.org/1379783002 Cr-Commit-Position: refs/heads/master@{#364484}
* Fix static initializers in cc/raster/texture_compressor_etc1_sse.ccradu.velea2015-12-101-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perftests for *TextureCompressorPerfTest* Before: *RESULT Compress256x256BlackAndWhiteGradientImage: ETC1 Low= 1.0986825227737427 us *RESULT Compress256x256BlackAndWhiteGradientImage: ETC1 Medium= 1.0968447923660278 us *RESULT Compress256x256BlackAndWhiteGradientImage: ETC1 High= 1.0986814498901367 us *RESULT Compress256x256SolidBlackImage: ETC1 Low= .2650042474269867 us *RESULT Compress256x256SolidBlackImage: ETC1 Medium= .26646843552589417 us *RESULT Compress256x256SolidBlackImage: ETC1 High= .27297326922416687 us *RESULT Compress256x256SolidColorImage: ETC1 Low= .2867283523082733 us *RESULT Compress256x256SolidColorImage: ETC1 Medium= .28761234879493713 us *RESULT Compress256x256SolidColorImage: ETC1 High= .2860330045223236 us *RESULT Compress256x256RandomColorImage: ETC1 Low= 1.9297336339950562 us *RESULT Compress256x256RandomColorImage: ETC1 Medium= 1.9182685613632202 us *RESULT Compress256x256RandomColorImage: ETC1 High= 1.9214648008346558 us After: *RESULT Compress256x256BlackAndWhiteGradientImage: ETC1 Low= 1.0688649415969849 us *RESULT Compress256x256BlackAndWhiteGradientImage: ETC1 Medium= 1.0757253170013428 us *RESULT Compress256x256BlackAndWhiteGradientImage: ETC1 High= 1.077048420906067 us *RESULT Compress256x256SolidBlackImage: ETC1 Low= .26659414172172546 us *RESULT Compress256x256SolidBlackImage: ETC1 Medium= .2658853828907013 us *RESULT Compress256x256SolidBlackImage: ETC1 High= .26466891169548035 us *RESULT Compress256x256SolidColorImage: ETC1 Low= .2858351469039917 us *RESULT Compress256x256SolidColorImage: ETC1 Medium= .2861722409725189 us *RESULT Compress256x256SolidColorImage: ETC1 High= .2875249981880188 us *RESULT Compress256x256RandomColorImage: ETC1 Low= 1.8891329765319824 us *RESULT Compress256x256RandomColorImage: ETC1 Medium= 1.8881990909576416 us *RESULT Compress256x256RandomColorImage: ETC1 High= 1.8776999711990356 us Unittests for *TextureCompressorETC1Test* Note: Google Test filter = TextureCompressorETC1Test.Compress256x256Ratio [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from TextureCompressorETC1Test [ RUN ] TextureCompressorETC1Test.Compress256x256Ratio [ OK ] TextureCompressorETC1Test.Compress256x256Ratio (1 ms) [----------] 1 test from TextureCompressorETC1Test (1 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (2 ms total) [ PASSED ] 1 test. [1/1] TextureCompressorETC1Test.Compress256x256Ratio (1 ms) SUCCESS: all tests passed. Tests took 0 seconds. BUG=568332 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1515753003 Cr-Commit-Position: refs/heads/master@{#364379}
* Revert of Allow one-copy task tile worker pool to use compressed textures. ↵engedy2015-12-107-123/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #14 id:260001 of https://codereview.chromium.org/1379783002/ ) Reason for revert: Resulted in linux-release/sizes/chrome-si/initializers failure: https://build.chromium.org/p/chromium/builders/Mac/builds/9905 https://build.chromium.org/p/chromium/builders/Linux/builds/69200 26a27 > # texture_compressor_etc1_sse.cc _GLOBAL__sub_I_texture_compressor_etc1_sse.cc+0xb 29c30 < # Found 28 static initializers in 8 files. --- > # Found 29 static initializers in 9 files. If this is intended, please update corresponding performance test expectations. Original issue's description: > Allow one-copy and zero-copy task tile worker pools to use compressed textures. > > BUG=434699 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/7d60ce9a132a88ead407a2a58c91edc431e68259 > Cr-Commit-Position: refs/heads/master@{#364326} TBR=reveman@chromium.org,nyquist@chromium.org,piman@chromium.org,sievers@chromium.org,christiank@opera.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=434699 Review URL: https://codereview.chromium.org/1513733003 Cr-Commit-Position: refs/heads/master@{#364342}
* Allow one-copy and zero-copy task tile worker pools to use compressed textures.christiank2015-12-107-79/+123
| | | | | | | | | BUG=434699 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1379783002 Cr-Commit-Position: refs/heads/master@{#364326}
* This change moves TaskGraph creation and management ofericrk2015-12-0314-730/+83
| | | | | | | | | | | | | | | | | task set finished callbacks to TileManager. This logic was nearly identical in all TileTaskRunners at this point. We do lose a bit of tracing data from OneCopyTileTaskWorkerPool, we can re-create this data by adding a new method to TaskGraphRunner, but it seemed redundant with the memory infra tracing data, so it seemed OK to drop. BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1470113002 Cr-Commit-Position: refs/heads/master@{#362874}
* Interface-izes TaskGraphRunner and moves implementation helpers to ↵ericrk2015-12-0114-897/+923
| | | | | | | | | | | | | | | | | TaskGraphWorkQueue. There are two new classes: SynchronousTaskGraphRunner - used in some tests and by LayerTreeHostImpl SingleThreadTaskGraphRunner - used in a number of tests (wrapped by TestTaskGraphRunner) and by GpuProcessTransportFactory and CompositorImplAndroid. Additionally RasterWorkerPool has been re-worked to use the new helper. BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1449133002 Cr-Commit-Position: refs/heads/master@{#362338}
* cc: Remove calls to Pass() on rvalues.danakj2015-11-201-2/+2
| | | | | | | | | | | | | | | | | These are not useful and break RVO. std::move() will (soon) warn us for doing this on scoped_ptrs. Also use move() instead of Pass() in container_util.h This gets rid of the remaining calls to Pass() in all of src/cc/. R=enne, vmpstr BUG=557422 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1461803003 Cr-Commit-Position: refs/heads/master@{#360898}
* cc: Pass correct stride to SkCanvas::readPixels.reveman2015-11-201-7/+2
| | | | | | | | | | | | Use buffer stride as provided instead of assuming that it is width*bpp aligned to 4 bytes. BUG=531430,293728 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1466673002 Cr-Commit-Position: refs/heads/master@{#360863}
* cc: Replace Pass() with std::move() in some subdirs.danakj2015-11-184-7/+7
| | | | | | | | | | | | | | | | This hits the following: cc/playback/ cc/raster/ cc/test/ cc/tiles/ R=enne, vmpstr BUG=557422 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1455753003 Cr-Commit-Position: refs/heads/master@{#360406}
* Make operators on scoped_ptr match the ones defined for std::unique_ptrdanakj2015-11-171-3/+7
| | | | | | | | | | | | | | | | | | | | | Currently scoped_ptr is missing comparison operators other than == and !=, and it defines those operators incorrectly (it compares to a raw pointer but unique_ptr compares to a unique_ptr). This fixes the operator== and !=, and adds .get() at a bunch of callsites. And adds the < > <= >= operators so that we don't have any differences in where you can use it. This will help the transition from scoped_ptr to unique_ptr as no code will have to change along with the rename wrt these operators. R=Nico, dcheng TBR=ellyjones, sky, jochen, wez, rockot, droger BUG=554390 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1440593004 Cr-Commit-Position: refs/heads/master@{#359957}
* cc: Remove ScopedPtrDeque.vmpstr2015-11-143-28/+32
| | | | | | | | | | | | | This patch removes ScopedPtrDeque and replaces it with a deque of scoped_ptrs. Note that this also adds a helper container_util file that contains TakeBack and TakeFront helpers. R=danakj CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1441613002 Cr-Commit-Position: refs/heads/master@{#359724}
* [tracing] Add names to memory-infra dumpers for debuggingprimiano2015-10-301-1/+1
| | | | | | | | | | | | | | | | | Follow-up CL to crrev.com/1425793002. Adds an extra |name| argument to the memory-infra RegisterDumpProvider methods. This allow to see the names of the dump providers in the trace and diagnose dump providers getting stuck or taking more time than usual. No further behavioral change is introduced by this CL. BUG=547764 TBR=xhwang@chromium.org,simonhatch@chromium.org,jochen@chromium.org,shess@chromium.org,piman@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1406213005 Cr-Commit-Position: refs/heads/master@{#357089}
* ui: Rename gfx::BufferUsage enum values and add BufferUsage::GPU_READ.reveman2015-10-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with the current usage modes is that we currently use SCANOUT for anything that doesn't require CPU access. When importing a buffer we typically don't care about anything but having the GPU be able to read from it. SCANOUT is not a good description of that and currently means GPU read/write support. This patch attempts to make usage more explicit and it solves the use case where a buffer type can only provide GPU read and not GPU write support (e.g. SHM fallback). Here are the new usage modes: - GPU_READ - GPU_READ_WRITE - GPU_READ_CPU_READ_WRITE GPU_READ is useful when importing a buffer and all you care about is being able to use it for sampling and optionally scanout. GPU_READ_WRITE is useful for things like WebGL or GPU raster where we want the ability to write to the buffer using GL and potentially use it for scanout. GPU_READ_CPU_READ_WRITE is the usage mode that allows CPU access and is used for one-copy and zero-copy texture initialization. There's nothing preventing this mode from also supporting scanout. - GPU_READ_CPU_READ_WRITE_PERSISTENT This usage mode indicates that the data will be persistent across Unmap()/Map() calls but will likely become part of the normal GPU_READ_CPU_READ_WRITE usage once all buffer types support this. BUG=538325 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1420923005 Cr-Commit-Position: refs/heads/master@{#356108}
* cc: Make sure to flush the context before waiting for copy queries to complete.reveman2015-10-241-0/+4
| | | | | | | | | | | | | Without a flush, there's no gurantee that a query result will ever be available. BUG=536582 TBR=vmpstr@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1417203002 Cr-Commit-Position: refs/heads/master@{#355937}
* Remove base::MessageLoop::{Quit,QuitClosure} functionski.stfu2015-10-231-2/+2
| | | | | | | | | | | | | This patch removes aliases for base::MessageLoop::QuitWhenIdle & base::MessageLoop::QuitWhenIdleClosure, and includes minor formatting changes made by using git cl-format. BUG=131220 TEST= R=danakj@chromium.org,brettw@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1390513002 Cr-Commit-Position: refs/heads/master@{#355763}
* Remove ContextProvider::VerifyContexts.dcastagna2015-10-221-1/+0
| | | | | | | | | | | ContextProvider::VerifyContexts is not used anywhere. BUG=544547 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1419923002 Cr-Commit-Position: refs/heads/master@{#355643}
* Reland: GpuMemoryBuffer interface change: Map(**) to Map() and ↵mcasas2015-10-222-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memory(plane); stride(plane) Relanding http://crrev.com/1401183003 which had a compile error. Original reviewers: TBR=avi@chromium.org, bajones@chromium.org, reveman@chromium.org, dalecurtis@chromium.org, fsamuel@chromium.org, miu@chromium.org Original CL description:----------------------------------- GpuMemoryBuffer interface change: Map(**) --> Map() + memory(plane); GetStride(*) --> stride(plane) And at the same time clean up/simplify/homogeneise uses of those APIs. buffer_format_util.cc:RowSizeForBufferFormatChecked() is only used in unittests and internally to the file, this CL restricts it to the .cc file. Also a function there is only used in test --> added ForTesting() suffix. BUG=542225 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/a11ca23b4ae411b4dc6cd8ff755e366680e80776 Cr-Commit-Position: refs/heads/master@{#355396} Review URL: https://codereview.chromium.org/1412223009 Cr-Commit-Position: refs/heads/master@{#355630}
* Revert of GpuMemoryBuffer interface change: Map(**) to Map() and ↵vasilii2015-10-222-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memory(plane); stride(plane) (patchset #5 id:610001 of https://codereview.chromium.org/1401183003/ ) Reason for revert: Broke Win x64 GN compilation: e:\b\build\slave\win_x64_gn\build\src\components\mus\gles2\mojo_gpu_memory_buffer.cc(78) :error C2220: warning treated as error - no 'object' file generated e:\b\build\slave\win_x64_gn\build\src\components\mus\gles2\mojo_gpu_memory_buffer.cc(78) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data Original issue's description: > GpuMemoryBuffer interface change: Map(**) --> Map() + memory(plane); GetStride(*) --> stride(plane) > > And at the same time clean up/simplify/homogeneise > uses of those APIs. > > buffer_format_util.cc:RowSizeForBufferFormatChecked() > is only used in unittests and internally to the file, this CL > restricts it to the .cc file. Also a function there is only > used in test --> added ForTesting() suffix. > > BUG=542225 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/a11ca23b4ae411b4dc6cd8ff755e366680e80776 > Cr-Commit-Position: refs/heads/master@{#355396} TBR=reveman@chromium.org,avi@chromium.org,bajones@chromium.org,dalecurtis@chromium.org,fsamuel@chromium.org,miu@chromium.org,mcasas@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=542225 Review URL: https://codereview.chromium.org/1409163003 Cr-Commit-Position: refs/heads/master@{#355511}
* Remove ContextProvider::DestroyedOnMainThread.dcastagna2015-10-211-1/+0
| | | | | | | | | | | | | | | | | | | ContextProvider::DestroyedOnMainThread was used on the main thread to check when a context bound to different thread had been destroyed. After crrev.com/1369843002, the only place where DestroyedOnMainThread is called is on the shared main thread context, that is already bound to the main thread. DestroyedOnMainThread and the lock used to protect |destroyed| are no longer needed. BUG=544547 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1406923004 Cr-Commit-Position: refs/heads/master@{#355431}