summaryrefslogtreecommitdiffstats
path: root/cc
Commit message (Collapse)AuthorAgeFilesLines
* Removing unnecessary tests to fix buildAlex Mineer2016-03-191-84/+0
| | | | | Cr-Commit-Position: refs/branch-heads/2623@{#643} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* Fix merge typoAlex Mineer2016-03-181-1/+1
| | | | | Cr-Commit-Position: refs/branch-heads/2623@{#641} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* cc: Ensure to process active low res pending high res tilings at rasterAlex Mineer2016-03-181-5/+5
| | | | | | | | | | | | | | | | | | | This patch ensures that we process active low res pending high res tilings, since they can have required for activation tiles. Previously, this only applied to non ideal tiles, but clearly it's possible to hit the rare case of low res on active while high res on pending. R=enne, chrishtr BUG=595209 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1808043002 (cherry picked from commit ad3070d0f8f9b7513222014d218d0937da6d8077) Cr-Original-Commit-Position: refs/heads/master@{#381613} Cr-Commit-Position: refs/branch-heads/2623@{#638} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* Store recording invalidations in DisplayListRecordingSource, save them via ↵Chris Harrelson2016-03-1813-31/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update. This fixes the referenced bug, as well as cleaning up the interaction between PictureLayer and DisplayListRecordingSource a little bit. This way both the invalidation and picture come from DisplayListRecordingSource, rather than one coming from PictureLayer and the other from DisplayListRecordingSource, with the latter modifying the invalidation during Update. Also renamed LayerImpl::GetInvalidationRegion() to LayerImpl::GetInvalidationRegionForDebugging() to make clear it's only used for that purpose. BUG=591561 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1812733003 Cr-Commit-Position: refs/heads/master@{#381977} (cherry picked from commit c41aca7b408e13fdee88a3b39db1a93813bd9fc1) Review URL: https://codereview.chromium.org/1811113004 . Cr-Commit-Position: refs/branch-heads/2623@{#637} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* Never call GraphicsLayer::paint when fetching painted output from cc.Chris Harrelson2016-03-173-1/+4
| | | | | | | | | | | | | | | | | | | GraphicsLayer::paint may not be a no-op if there happened to be dirty layout or paint since the last time a synchronized paint occurred. BUG=585694 TBR=ajuma@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1690763003 Cr-Commit-Position: refs/heads/master@{#374864} (cherry picked from commit 4d0892b08c7f42a433a278c05498d7c6ddbe8eeb) Review URL: https://codereview.chromium.org/1812093002 . Cr-Commit-Position: refs/branch-heads/2623@{#631} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* Make hud layer initialize its own font.Stanislav Chiknavaryan2016-02-254-7/+50
| | | | | | | | | | | | | | | | | | | | | | Make hud layer initialize its own font, rather than relying on a pre-set shared global. This fixes the crash in issue 577663, and as a bonus, allows us to eventually bypass hud font loading if the hud isn't being displayed. BUG=577663 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1714653002 Cr-Commit-Position: refs/heads/master@{#376539} (cherry picked from commit feee7f74e0a0cd60d91c1aa3a3968432f1177768) TBR=asvitkine@google.com, jam@chromium.org, enne@chromium.org Review URL: https://codereview.chromium.org/1739573002 . Cr-Commit-Position: refs/branch-heads/2623@{#514} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* CC Animation: Speed up AnimationTimeline PushPropertiesTo by using a hash map.Alexey Baskakov2016-02-102-47/+40
| | | | | | | | | | | | | | | | | | | | Use a hash map to store all the animation players for a given timeline. This makes the average performance for PushPropertiesTo to be O(n) instead of O(n^2). Perf test: https://codereview.chromium.org/1679923004/ BUG=574859 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1680043002 Cr-Commit-Position: refs/heads/master@{#374326} (cherry picked from commit 10d6267a460c0afd96a8d374c935b0fa2ff56929) Review URL: https://codereview.chromium.org/1686243003 . Cr-Commit-Position: refs/branch-heads/2623@{#358} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* [Merge m49] cc: Update pending tree when external constraints changeBo Liu2016-02-092-0/+36
| | | | | | | | | | | | | | | | | | | | | | | External tile constraint updates should update draw properties in pending tree. Otherwise it's possible that pending tree remains out of sync even after activation. Not the external draw properties do not need to be updated since activation does not by itself update active tree draw properties. BUG=552398 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1672453002 Cr-Commit-Position: refs/heads/master@{#374194} (cherry picked from commit 5a1970d3aafbf7b9dd5eacad3d0a774c22bdffcd) Review URL: https://codereview.chromium.org/1683753002 . Cr-Commit-Position: refs/branch-heads/2623@{#334} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* cc: Fix best-effort sync scroll regression.Brian Anderson2016-02-084-20/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Considers the BeginMainFrame fast if it responds before the next BeginImplFrame, rather than by the deadline. To prevent estimates from getting stuck because the scheduler never sends a certain type of BeginMainFrame (critical or non critical), this patch also changes estimates to reflect the following two assumptions: 1) Critical BeginMainFrames will be fast if new BeginMainFrames of any type are fast. 2) Non critical BeginMainFrames will be slow if new BeginMainFrames of any type are slow. BUG=582749 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1664483002 Cr-Commit-Position: refs/heads/master@{#373975} (cherry picked from commit 185afcd419f6436528eb43eef29d53bdd8b5cf3e) Review URL: https://codereview.chromium.org/1678983002 . Cr-Commit-Position: refs/branch-heads/2623@{#299} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* cc :: Fix sublayer scale bug when we have scroll parentsJayadev Dasika2016-02-022-16/+52
| | | | | | | | | | | | | | | | | | | | | The current visible rect computation logic with property trees assumes that whenever a layer's target is different from its clip node's target, it is because the layer has a clip parent. But, this case is possible even when the layer has a scroll parent. When we have scroll parent, we need to apply scales differently because clip parent is an ancestor but scroll parent is not. BUG=576959 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1643053002 Cr-Commit-Position: refs/heads/master@{#372257} (cherry picked from commit 2489a446981f61142c2e2679b4b39435d8b8958b) Review URL: https://codereview.chromium.org/1660153002 . Cr-Commit-Position: refs/branch-heads/2623@{#254} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* cc: Fix bug where tabs have the wrong scale factorChristopher Cameron2016-02-022-0/+9
| | | | | | | | | | | | | | | | | | | Device scale factor impacts the draw properties (in particular, the transforms of the TransformNodes in the property tree). So, mark that draw properties need to be updated when device scale factor changes. BUG=567832 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1633043004 Cr-Commit-Position: refs/heads/master@{#371659} (cherry picked from commit a65c79bc20f5ec529973d953d358e3db560a02e9) Review URL: https://codereview.chromium.org/1656413002 . Cr-Commit-Position: refs/branch-heads/2623@{#247} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* [Merge m49] cc: Early out of UpdateTiles for resoureceless drawBo Liu2016-01-289-202/+88
| | | | | | | | | | | | | | | | | | | | This ensures that software draws with different draw properties do not affect tiling decisions. This avoids an invalidate-redraw loop if every invalidate leads to resourceless draw(s) with different draw properties that cause more tiling updates and invalidates. BUG=577433 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1591513002 Cr-Commit-Position: refs/heads/master@{#371615} (cherry picked from commit 99b904adcfc2d25f5a06bcf1e122387ef2c21d7d) Review URL: https://codereview.chromium.org/1641573004 . Cr-Commit-Position: refs/branch-heads/2623@{#169} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* Stop non-user scrollable layers from scrolling on the compositorYash Malik2016-01-262-4/+94
| | | | | | | | | | | | | | | BUG=579207 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1623663002 Cr-Commit-Position: refs/heads/master@{#371250} (cherry picked from commit 399b4764c4020e5a0c2e4da0f457971447f6b286) Review URL: https://codereview.chromium.org/1633253002 . Cr-Commit-Position: refs/branch-heads/2623@{#146} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* cc:: Add Transform node for scroll child in property treesJayadev Dasika2016-01-222-1/+51
| | | | | | | | | | | | | | | | | | | | | During property tree building, scroll child is called from its scroll parent and not its parent. When the scroll parent and the scroll child have different targets, we need to create a transform node for scroll child to set the right target for the subtree. BUG=576959,577930 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1601523010 Cr-Commit-Position: refs/heads/master@{#370447} (cherry picked from commit 8ccff3d46f9c13ca98ceb4c3df4e8878008260b8) Review URL: https://codereview.chromium.org/1622743004 . Cr-Commit-Position: refs/branch-heads/2623@{#90} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* Mac: Add support for clipping and arbitrary transformsChristopher Cameron2016-01-224-73/+62
| | | | | | | | | | | | | | | | | | | | | | | | | Create a hierarchy as described in the design document at https://docs.google.com/document/d/1DtSN9zzvCF44_FQPM7ie01UxGHagQ66zfF5L9HnigQY/edit#heading=h.xm56c9edenjg Move maintenance of this hierarchy to a separate file, ca_layer_tree_mac.mm. Remove support for overlays from ImageTransportOverlayMac, because they now just add complication for not much additional energy savings. BUG=533681 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1585323004 Cr-Commit-Position: refs/heads/master@{#370606} (cherry picked from commit efbddf0092035837fe9d2e2ebdb90237906869bb) Review URL: https://codereview.chromium.org/1629473002 . Cr-Commit-Position: refs/branch-heads/2623@{#82} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* Support sharing stream textures between Render and GPU threads in WebView.Tobias Sargeant2016-01-204-13/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Alternate implementation; copy made in VideoResourceUpdater] In WebView, the underlying surface texture can’t be shared between the Render and GPU threads because it cannot be associated with a second EGLImage (the framework SurfaceTexture has already done this, and a GL texture can’t be a sibling of more than one EGLImage). When in synchronous compositing mode, the SurfaceTexture is bound to the GPU thread context but must be drawable by the Render thread. In order to enable this we have to perform a texture copy. It may be possible, with framework cooperation, to optimize this texture copy away at a later date. This change has the side-effect of supporting capturing video frames into a canvas and webgl texture in WebView. BUG=545618, 496045, 352645 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1526063002 Cr-Commit-Position: refs/heads/master@{#370369} (cherry picked from commit 7a1cd12d7135fd26f96ae2d4c1a31c3fa184f92f) Review URL: https://codereview.chromium.org/1605163003 . Cr-Commit-Position: refs/branch-heads/2623@{#18} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
* cc: Add some tracing below LayerTreeHost::PushProperties.danakj2016-01-168-20/+33
| | | | | | | | | | | | | Traces showed this taking 500ms which is ridiculous, so add some traces below it to try narrow this down a bit. R=enne BUG=577619 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1586343003 Cr-Commit-Position: refs/heads/master@{#369904}
* Plumb NotifyAnimationAborted from the compositor to blink animation delegate.ymalik2016-01-1514-1/+73
| | | | | | | | | | | | | | | This is needed to clear the blink scroll animator state when an animation started on the MT is cancelled by the compositor. TESTED=forced MT animation to abort from the compositor and verified that the delegate override on the blink side is called. BUG=576438 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1587073011 Cr-Commit-Position: refs/heads/master@{#369856}
* (De)-serialize BeginMainFrameAndCommitState to protobuf.khushalsagar2016-01-1521-1/+468
| | | | | | | | | BUG=550687 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1581773002 Cr-Commit-Position: refs/heads/master@{#369836}
* Verify returned frames from media::VideoFrame::Wrap*() methodsemircan2016-01-153-32/+45
| | | | | | | | | BUG=552112 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1476523005 Cr-Commit-Position: refs/heads/master@{#369705}
* Add support for deserializing without existing root nodenyquist2016-01-153-3/+36
| | | | | | | | | | | | | | | | | | | When deserializing a layer tree for the first time, there is no existing root. Not all parts of the code supported this scenario, and this CL adds support for this use-case for the hierarchy deserialization. They property deserialization still requires an existing root since the deserialization should have happened before. This also adds a test for the initial deserialization. BUG=577310 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1584263002 Cr-Commit-Position: refs/heads/master@{#369636}
* CC Animation: Replace AnimiationEventsVector with AnimiationEvents class.loyso2016-01-1432-228/+232
| | | | | | | | | | | | | | It allows us to use the forward declaration for AnimiationEvents. This is a preparation to make AnimiationEvents an abstract class, unknown for CC. BUG=575053 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1584743002 Cr-Commit-Position: refs/heads/master@{#369591}
* cc:: (De)-serialize CommitEarlyOutReason to protobufkhushalsagar2016-01-148-0/+125
| | | | | | | | | BUG=550687 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1583023004 Cr-Commit-Position: refs/heads/master@{#369541}
* Tweak smooth scrolling speed.skobes2016-01-146-37/+100
| | | | | | | | | | | | | | Keyboard scrolls are reduced to 150ms. Wheel scrolls retain the 200ms duration for small deltas, but are tightened down to 100ms as delta increases. This is a variation on mgiuca's patch in http://crrev.com/1563393003. BUG=575409 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1575803002 Cr-Commit-Position: refs/heads/master@{#369540}
* cc: Fix display_scheduler.cc NOTIMPLEMENTEDboliu2016-01-141-1/+2
| | | | | | | | | | | | | OnBeginFrameSourcePausedChanged(false) can actually happen because BeginFrameSourceBase::AddObserver calls it. But it's never set to true for DisplayScheduler. BUG=577563 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1582183003 Cr-Commit-Position: refs/heads/master@{#369487}
* Add support for (de)serializing LayerTreeHost.nyquist2016-01-148-0/+552
| | | | | | | | | | | | | | As part of the cc commit flow, we need to be able to serialize the LayerTreeHost. Not all state is necessary to serialize to be able to do a commit on the client side, so only some members are included in the proto. BUG=561210 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1519293002 Cr-Commit-Position: refs/heads/master@{#369450}
* Abort smooth scroll animation if followed by an instant scroll.ymalik2016-01-147-0/+107
| | | | | | | | | BUG=576438 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1582003003 Cr-Commit-Position: refs/heads/master@{#369444}
* cc: Do solid color analysis before scheduling tiles.sohan.jyoti2016-01-139-146/+166
| | | | | | | | | | | | | 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}
* Always antialias clips in ClipDisplayItem.chrishtr2016-01-131-3/+5
| | | | | | | | | BUG=390040 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1566193002 Cr-Commit-Position: refs/heads/master@{#369246}
* Add begin frame paused signalboliu2016-01-1313-5/+275
| | | | | | | | | | | | | | | | | | | This avoids a deadlock situation in android webview where begin frames have stopped, but the blink main thread is blocked indefinitely waiting for activation. See bug for details. Plumb a signal that the BeginFrameSource is paused directly through BeginFrameSourceObserver, and force activate any pending activations when paused. This is similar to when compositor becomes invisible, but BFS allows webview send the signal without a hop to blink main thread. BUG=539373 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1536353003 Cr-Commit-Position: refs/heads/master@{#369238}
* 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-137-17/+86
| | | | | | | | | | | | | | | | 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}
* cc:: Fix scaling bug while computing transforms using property trees.jaydasika2016-01-132-2/+43
| | | | | | | | | | | | | | | In TransformTree::CombineTransformsBetween, if the destination owns a render surface, we use the cached target space transform. Since it has sublayer scale baked in, we remove this by prescaling by (1/sublayer scale). As this is scaling at destination, we need to postscale and not prescale. BUG=576569 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1584573003 Cr-Commit-Position: refs/heads/master@{#369053}
* Don't dump not-yet-allocated resources.ericrk2016-01-121-19/+28
| | | | | | | | | | | | | | | | | | | Currently the ResourceProvider dumps resources which have not yet been allocated - it just does not assign them with a global edge. This isn't really correct, as these resoruces have no backing memory and should not be contributing to totals. This CL removes these resources from the dump and cleans up the logic that generates global edges to be clearer about what is expected. BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/fe2a79471f6318413426d51ead7f9d1e43ffb2ed Cr-Commit-Position: refs/heads/master@{#368137} Review URL: https://codereview.chromium.org/1547453002 Cr-Commit-Position: refs/heads/master@{#368999}
* Add velocity and phase to ScrollState in CCmajidvp2016-01-1211-524/+938
| | | | | | | | | | | | | | - Add velocity and phase information to ScrollState - Update InputeHandler::Scroll{Begin,By,End} methods to take in |ScrollState| - Ensure begin and end of scroll gesture distribute a zero scroll delta to make scrolling model match Blink's BUG=551406 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1506943003 Cr-Commit-Position: refs/heads/master@{#368985}
* Use SkPaintImageFilter instead of SkRectShaderImageFilterajuma2016-01-121-1/+0
| | | | | | | | | | | SkRectShaderImageFilter is going to be removed. BUG=skia:4780 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1579993003 Cr-Commit-Position: refs/heads/master@{#368929}
* CreateLightingFilter is moving to SkColorMatrixFilterreed2016-01-121-1/+2
| | | | | | | | | | | BUG=skia:4791 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=ajuma trivial refactoring Review URL: https://codereview.chromium.org/1574903005 Cr-Commit-Position: refs/heads/master@{#368854}
* Move SelectionBoundType to inside the LayerSelectionBound message.nyquist2016-01-122-22/+22
| | | | | | | | | | | | | | The SelectionBoundType is only used inside the LayerSelectionBound proto message, so it should be part of that instead of a top-level proto, which causes issues with other top-level enums in the same namespace. BUG=561210 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1578523002 Cr-Commit-Position: refs/heads/master@{#368781}
* Mac Overlays: Initialize edge aa maskccameron2016-01-122-10/+7
| | | | | | | | | BUG=567946 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1573543002 Cr-Commit-Position: refs/heads/master@{#368780}
* Fixed an issue with verifying resource sync tokens.dyen2016-01-121-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The address of resource sync tokens were being stored in an array before passing these addresses to VerifySyncTokensCHROMIUM(). There were 2 problems with this: 1. We were storing the resource adress on the stack and not pushed the one pushed into the TransferableResourceArray which is a std::vector. 2. Even if we stored the address of the item within the vector, the address could change as we push more items. This could either be solved by storing the address within the vector while simultaneously reserving the maximum amount of space used which guarantees the address will not move, or storing the indexes and getting the address after the vector is stable. I have opted for the second option here. I also fixed a small issue in VerifySyncTokensCHROMIUM() so that it now handles invalid sync tokens being passed to be verified. R=piman@chromium.org BUG=514815 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1577103002 Cr-Commit-Position: refs/heads/master@{#368765}
* cc: Allow returning overlay resources upon swap completionccameron2016-01-129-94/+68
| | | | | | | | | | | | | | | | | | | | | | | | On Mac, the only way to reliably know that overlay resources are no longer in use is by the function IOSurfaceIsInUse (which is checked by the functions ResourceProvider::InUseByConsumer and ResourceProvider::CanLockForWrite). IOSurfaceIsInUse will start returning true as soon as a CALayer has its contents set to an IOSurface, which happens during swap in the GPU process (in particular, when a Mach port for the IOSurface is created for sending to the WindowServer process), and so the earliest time that resources may be returned to the renderer process is swap completion. Repurpose a now-extinct flag to indicate that overlay resources are to be returned immediately upon swap acknowledgement, and add tests to ensure this behavior. BUG=558701 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1523063005 Cr-Commit-Position: refs/heads/master@{#368751}
* GpuMemoryBuffers: Add an IsInUse functionccameron2016-01-114-3/+54
| | | | | | | | | | | | | | | | | Add a function GpuMemoryBuffer::IsInUseByWindowServer to see if a resource is currently in use by the system. This will only return true on Mac, where it returns the result of IOSurfaceIsInUse. Hook this up to cc::ResourceProvider::CanLockForWrite and InUseByConsumer. These fix the bug where tiles would flicker during reuse. BUG=558701 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1527483003 Cr-Commit-Position: refs/heads/master@{#368718}
* cc: Use effect tree to track the number of copy requestssunxd2016-01-1116-103/+152
| | | | | | | | | | | | | | | | | Move num_layer_or_descendants_with_copy_requestfrom layer_tree to effect_tree. This update introduces false positives to the variable: if a layer owns no effect node, it returns the value of its nearest ancestor who owns a effect node. BUG=574192 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1566913004 Cr-Commit-Position: refs/heads/master@{#368664}
* CC Animation: Fix AnimationHost::ScrollAnimationUpdateTarget.loyso2016-01-113-7/+49
| | | | | | | | | | | | | 1) Do not crash if animation player is detached. 2) Unrelated: Extract method ReattachScrollOffsetPlayerIfNeeded 3) Unrelated: Use common base class in unittests. BUG=575531 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1577703002 Cr-Commit-Position: refs/heads/master@{#368582}
* Check display_list_ in HasDiscardableImagesInRectvollick2016-01-092-1/+83
| | | | | | | | | | | It turns out that this can be NULL. BUG=575623 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1575553002 Cr-Commit-Position: refs/heads/master@{#368522}
* Fix tree topology in layer_tree_host_unittest:sunxd2016-01-092-29/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The topology used before r368087: -Root(PageScaleLayer & ScrollClipLayer) --PinchLayer ---ImageLayer The previous topology: -Root(PageScaleLayer) --ScrollClipLayer ---PinchLayer ----ImageLayer can cause a problem that MaxScrollOffset cannot compute the correct scale_factor because clip layer is also affected by page scale. The topology after change: -Root(ScrollClipLayer) --PageScaleLayer ---PinchLayer ----ImageLayer After the fix, the clip layer is no longer affected by page scale. The tests should behave the same as those before the change r368087. BUG=575392,575634 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1572643003 Cr-Commit-Position: refs/heads/master@{#368503}
* Implement external stencil for Android WebViewboliu2016-01-094-1/+5
| | | | | | | | | | | | | | Add an OutputSurface::ApplyExternalStencil method. Android WebView implements this method on the render thread and applies the stencil parameters read in functor, through the command buffer client. BUG=574570 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1564703005 Cr-Commit-Position: refs/heads/master@{#368468}
* Make cc::DrawingDisplayItem hold a const SkPicture.jbroman2016-01-083-8/+7
| | | | | | | | | | | This lets us remove const_cast<SkPicture*> from callers (i.e. Blink) which hold SkPicture through const pointers. CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1564233005 Cr-Commit-Position: refs/heads/master@{#368444}
* cc: Add ericrk to cc owners.vmpstr2016-01-081-1/+2
| | | | | | | | | R=enne, reveman, ericrk NOTRY=True Review URL: https://codereview.chromium.org/1575433004 Cr-Commit-Position: refs/heads/master@{#368393}
* Work around a clang/win compile error.Nico Weber2016-01-081-1/+3
| | | | | | | | | | | See bug. No behavior change. BUG=575700 TBR=vollick Review URL: https://codereview.chromium.org/1574453002 . Cr-Commit-Position: refs/heads/master@{#368341}