| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is specifically for the case of premultiplyAlpha=false.
Following is an example. Given an image with only one pixel with value of
(255, 0, 0, 26), and we load the this image either as a Blob or a
HTMLImageElement and call createImageBitmap with premultiplyAlpha=false.
the ImageBitmap::copyBitmapData will return a pixel
value of (197, 0, 0, 26) which is totally wrong. The reason it fails
is that the SkImage that is extracted from ImageDecoder is always
in kPremul alphaType even if "AlphaNotPremultiplied" is given to
the ImageDecoder.
With this CL: https://codereview.chromium.org/1820733004/, the
extracted SkImage now has a kUnpremul alphaType. ImageBitmap
should adapt to this change as well. So this CL make correction
for the case of createImageBitmap from Blob and HTMLImageElement
so that copyBitmapData will succeed with the SkImage extracted
from ImageDecoder.
We have also updated corresponding layout tests. In particular, we change
an existing image's alpha channel from 128 to 26. In this case, if the
ImageBitmap constructor handles premultiplyAlpha=false by first premultiply
and then un-premultiply, we will see a large loss comparing with input.
Here we can see that the color is very close (tolerance of 2) to its input
image. Additionally, we added several new layout tests to test the
cases of createImageBitmap(ImageBitmap) where the parameter ImageBitmap
is created from various kinds of sources.
2 layout tests are deleted under fast/canvas/. The reason is that
these layout tests uses 2d canvas to display an ImageBitmap,
and it cannot distinguish an ImageBitmap created with premultiplyAlpha=
false with an ImageBitmap created with true. Now that we have
a large set of layout tests under fast/canvas/webgl, these 2 tests
are redundant.
Review URL: https://codereview.chromium.org/1809603004
Cr-Commit-Position: refs/heads/master@{#383004}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new Web APIs that are implemented are:
* OffscreenCanvasRendering2D.beginPath()
* OffscreenCanvasRendering2D.fill(optional CanvasFillRule)
* OffscreenCanvasRendering2D.fill(Path2D, optional CanvasFillRule)
* OffscreenCanvasRendering2D.stroke()
* OffscreenCanvasRendering2D.stroke(Path2D)
* OffscreenCanvasRendering2D.lineWidth
* OffscreenCanvasRendering2D.lineCap
* OffscreenCanvasRendering2D.lineJoin
* OffscreenCanvasRendering2D.miterLimit
* OffscreenCanvasRendering2D.setLineDash(array);
* OffscreenCanvasRendering2D.getLineDash
* OffscreenCanvasRendering2D.lineDashOffset
A subset of existing Web APIs shared with non-Offscreen
canvas from CanvasPathMethods are also tested, including:
arc, lineTo, bezierCurveTo, moveTo, closePath.
BUG=563856
Review URL: https://codereview.chromium.org/1806943005
Cr-Commit-Position: refs/heads/master@{#382584}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements a whitelist for canvas filters. Any
non-whitelisted filter taints the canvas. To start
with, CSS shorthand filters are whitelisted, along
with SVG filters that consist only of the following
effects:
1) SourceGraphic
2) SourceAlpha
3) FillPaint
4) StrokePaint
5) feColorMatrix
6) feMerge
BUG=571048
Review URL: https://codereview.chromium.org/1783013003
Cr-Commit-Position: refs/heads/master@{#381961}
|
|
|
|
|
|
|
|
|
|
|
|
| |
This option is specifically for createImageBitmap from a Blob or a
HTMLImageElement. This CL adds support for this option, starting with
Blob. Layout tests are added to ensure the correctness.
BUG=592005
Review URL: https://codereview.chromium.org/1763043002
Cr-Commit-Position: refs/heads/master@{#381224}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change makes 2D contexts renderable on workers. It only
implements the bare minimum interfaces required to draw rectangles
on a worker and bring the results to screen via ImageBitmap transfer.
The new Web APIs that are implemented are:
* OffscreenCanvasRendering2D.fillStyle
* OffscreenCanvasRendering2D.strokeStyle
* OffscreenCanvasRendering2D.fillRect
* OffscreenCanvasRendering2D.strokeRect
* OffscreenCanvasRendering2D.clearRect
* OffscreenCanvas.transferToImageBitmap
BUG=563856, 563832
Review URL: https://codereview.chromium.org/1775153002
Cr-Commit-Position: refs/heads/master@{#381085}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the spec[1], should support rerouting event if there is a control
on hit region. This CL is also includes fixing two spec issues[2][3] and test.
[1] https://html.spec.whatwg.org/multipage/scripting.html#canvas-mouseevent-rerouting-steps
[2] https://github.com/whatwg/html/issues/547
[3] https://github.com/whatwg/html/issues/548
BUG=579076,579614,582792
Review URL: https://codereview.chromium.org/1654653002
Cr-Commit-Position: refs/heads/master@{#380870}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few weeks ago, there is an awesome CL here:
https://codereview.chromium.org/1601093008
that removed duplicate WebGL layout tests. However, it appears that the
resources that are associated with them were left over.
This CL cleans up the non-used resource files.
Review URL: https://codereview.chromium.org/1777483004
Cr-Commit-Position: refs/heads/master@{#379939}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At this moment, there is an extensive coverage of this testing hosted on
KhronosGroup/WebGL. However, the problem is that we cannot have coverage
of the case for ImageBitmap constructor to take a "default" value for
some of the constructor options such as premultiplyAlpha. The reason is
that the option "default" is implementation-specific, and the results
could vary for different browsers.
In here, we add layout tests in chromium code base to have more test
cases than the ones hosted on KhronosGroup/WebGL.
Also, the KhronosGroup/WebGL testing suite tests tex(Sub)Image2D for 38
different kinds of pixel formats such as RGBA + UNSIGNED_SHORT_4444.
Here we test the basic one which is RGBA + UNSIGNED_BYTE, we can always
extend that in the future.
Review URL: https://codereview.chromium.org/1767113003
Cr-Commit-Position: refs/heads/master@{#379879}
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the getContext() function in OffscreenCanvas.
It also implements the skeleton of OffscreenCanvasRenderingContext2D, an object type
returned by getContext("2d").
BUG=563826
Review URL: https://codereview.chromium.org/1748163003
Cr-Commit-Position: refs/heads/master@{#379740}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At this moment, there are two options of "none" and "default", this CL
adds "premultiply". The code path for "premultiply" and "default" is the
same so we can avoid large changes of any existing C++ code. Layout tests has
been created to reflect this additional option.
Locally I have added this option to all the conformance tests for
ImageBitmap hosted by KhronosGroup/WebGL, and they all pass.
Once this CL landed, there will be a pull request to update those tests.
BUG=591713
Review URL: https://codereview.chromium.org/1756963003
Cr-Commit-Position: refs/heads/master@{#379302}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ImageBitmap class lacks null check. In particular, the cropImage()
method creates a SkSurface and this CL does null check for that. Also,
in several other methods in this class, it calls m_image->setOriginClean()
and this CL does null check for m_image as well. Moreover, in the
case where m_image is null, the promise will be rejected.
After this null check, the crash reported in the bug goes away.
BUG=588980
Review URL: https://codereview.chromium.org/1740633003
Cr-Commit-Position: refs/heads/master@{#378228}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With premultiplyAlpha=true, the implementation of this function creates
a premultiplied SkSurface and grab a snapshot from it.
To prevent any data loss, we should try to create a SkImage directly from
the raw unpremultiplied data. There are several tricky cases here. First,
we need to take care of the case when the crop region is not the same as
the original ImageData size, where we need to malloc a temporary buffer
and copy the data over. Also, we need to take care of the case when flipY
is set to be true, because we need to only flip the area that is inside
the crop region.
BUG=589131
Review URL: https://codereview.chromium.org/1680173003
Cr-Commit-Position: refs/heads/master@{#378080}
|
|
|
|
|
|
|
|
|
|
|
| |
In a previous CL here: https://codereview.chromium.org/1727813002/, we
re-named OffScreenCanvas to OffscreenCanvasTemp. This CL changes it to
OffscreenCanvas which is complied with the proposal here:
https://wiki.whatwg.org/wiki/OffscreenCanvas
Review URL: https://codereview.chromium.org/1733763003
Cr-Commit-Position: refs/heads/master@{#377572}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we start it, this was named OffScreenCanvas. The whatwg proposal here:
https://wiki.whatwg.org/wiki/OffscreenCanvas actually names it OffscreenCanvas.
We cannot directly change OffScreenCanvas to OffscreenCanvas because windows
and Mac are case-insensitive. So in this CL we change it to a temp name and
in a follow up CL this will be changed to OffscreenCanvas.
Review URL: https://codereview.chromium.org/1727813002
Cr-Commit-Position: refs/heads/master@{#377340}
|
|
|
|
|
|
|
|
|
|
| |
When the canvas fill or stroke style changes, filters need
to be rebuilt so that their FillPaint and StrokePaint values
match the updated fill and stroke.
Review URL: https://codereview.chromium.org/1708603002
Cr-Commit-Position: refs/heads/master@{#376169}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the hit region spec[1], the control parameter should be a supported
interactive canvas fallback element.
[1] https://html.spec.whatwg.org/multipage/scripting.html#supported-interactive-canvas-fallback-element
BUG=328961
Review URL: https://codereview.chromium.org/1692183002
Cr-Commit-Position: refs/heads/master@{#375312}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
createImageBitmap(HTMLCanvasElement)
It turns out that HTMLCanvasElement is always premultiplied in Blink, so
we cannot simply use a decoder to re-decode it to a un-premultiplied format.
The strategy this CL takes is that after cropping the HTMLCanvasElement
into a SkImage, we convert the SkImage into a un-premultiplied format if
that's what the option specifies.
PS#1 causes compilation error, PS#4 should work.
Review URL: https://codereview.chromium.org/1694793002
Cr-Commit-Position: refs/heads/master@{#375212}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the OffscreenCanvas[1] feature proposal. It is currently
hidden behind the 'experimental canvas features' runtime
flag.
[1] https://wiki.whatwg.org/wiki/OffscreenCanvas
BUG=563861
Review URL: https://codereview.chromium.org/1598923002
Cr-Commit-Position: refs/heads/master@{#375198}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
createImageBitmap(HTMLCanvasElement) (patchset #1 id:1 of https://codereview.chromium.org/1694793002/ )
Reason for revert:
Cause compilation error
https://build.chromium.org/p/chromium.mac/builders/Mac%20Builder/builds/37356/steps/compile/logs/stdio
Original issue's description:
> Revise the code for premultiplyAlpha=false for createImageBitmap(HTMLCanvasElement)
>
> It turns out that HTMLCanvasElement is always premultiplied in Blink, so
> we cannot simply use a decoder to re-decode it to a un-premultiplied format.
> The strategy this CL takes is that after cropping the HTMLCanvasElement
> into a SkImage, we convert the SkImage into a un-premultiplied format if
> that's what the option specifies.
TBR=junov@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1693863002
Cr-Commit-Position: refs/heads/master@{#375193}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
createImageBitmap(HTMLCanvasElement)
It turns out that HTMLCanvasElement is always premultiplied in Blink, so
we cannot simply use a decoder to re-decode it to a un-premultiplied format.
The strategy this CL takes is that after cropping the HTMLCanvasElement
into a SkImage, we convert the SkImage into a un-premultiplied format if
that's what the option specifies.
Review URL: https://codereview.chromium.org/1694793002
Cr-Commit-Position: refs/heads/master@{#375191}
|
|
|
|
|
|
|
|
|
|
|
| |
https://chromium.googlesource.com/chromium/src/+/0c7e2f7bc
BUG=581355
TBR=fmalita@chromium.org
Review URL: https://codereview.chromium.org/1687093005 .
Cr-Commit-Position: refs/heads/master@{#374775}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switches Skia's software HQ downscaling algorithm from Mitchell to
mipmaps.
This is a good idea because
1) it aligns the results with Ganesh (which already uses
mipmaps for downscaling)
2) mipmaps are cheaper/more efficient (to produce and to cache)
3) yields (arguably) sharper results, particularly when scaling to
half size - which appears to be a common technique used for
Retina-ready pages.
BUG=583478,562162
R=reed@google.com,senorblanco@chromium.org
Review URL: https://codereview.chromium.org/1511113004
Cr-Commit-Position: refs/heads/master@{#374703}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this CL, we implement the premultiplyAlpha option for ImageBitmap in
the case of HTMLVideoElement.
This CL modifies the existing layout test to test all the cases of
cobmining flipY and premultiplyAlpha. Several cases are commentted out
in the layout test because skia doesn't yet support draw an umpremul
SkImage.
BUG=249382
Review URL: https://codereview.chromium.org/1677383002
Cr-Commit-Position: refs/heads/master@{#374511}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a canvas filter includes a reference to an svg filter,
the canvas filter needs to be rebuilt whenever the svg filter
changes. This CL makes the canvas context get notified of
such changes, so that the filter gets rebuilt before its next
use.
BUG=581135
Review URL: https://codereview.chromium.org/1640203003
Cr-Commit-Position: refs/heads/master@{#374507}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this CL, we implement the option of premultiplyAlpha for ImageBitmap.
At this moment, it works for createImageBitmap from HTMLImageElement,
HTMLCanvasElement and Blob. The cases of from ImageBitmap, HTMLVideoElemtn
and ImageData will be solved in future CL(s).
This CL also includes modifies a current layout tests, which tests
the combination of ImageBitmap options "flipY" and premultiplyAlpha
BUG=249382
Review URL: https://codereview.chromium.org/1609763002
Cr-Commit-Position: refs/heads/master@{#374132}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After we confirm to use idle-tasks implementation in toBlob, the cancellation
mechanism for async thread implementation is no longer useful. First, compositor
thread is definitely alive when users open Chrome browser; so the alternative
code path for PNG image encoding when compositor thread is disabled would be
unreachable in real-world situations; as a result, PNG image encoding happens
in idle tasks only. Second, JPEG and WEBP image formats do not have progressive
encoding at this moment and thus cancellation mechanism is not useful to them
either; once their progressive encoding implementations are completed, they
would be moved over to idle-tasks implementation too.
This patch removes ContextObserver and CanvasAsyncBlobCreatorTest; it also moves
all layout tests that use toBlob on PNG image formats to virtual/threaded as
idle tasks require compositor thread to be alive. There is no need to perform
tests on toBlob (png) in scenarios when compositor thread is not available.
BUG=581574
Review URL: https://codereview.chromium.org/1669713002
Cr-Commit-Position: refs/heads/master@{#373567}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL implements the ImageBitmap option imageOrientation for the method
createImageBitmap(ImageData) only. For createImageBitmap from other sources,
there will be separate CLs to handle them.
The whatwg wiki for the ImageBitmap options is here:
https://wiki.whatwg.org/wiki/ImageBitmap_Options
In the case of ImageData, the option none/topLeft should behave the same,
which is "Do not change orientation". This is because ImageData does
not contain any image media meta data. Similarly, For the option of
flipY/topLeft, the behavior should be flip the image vertically.
This CL also includes a layout test, which re-uses the existing test with
the additional parameter of "flipY", and currently the layout test is for
the ImageData as source only.
BUG=249382
Review URL: https://codereview.chromium.org/1631733003
Cr-Commit-Position: refs/heads/master@{#373274}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
related tests (patchset #3 id:40001 of https://codereview.chromium.org/1653253003/ )
Reason for revert:
This patch appears to be causing Document leaks. See, for example: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Leak/builds/17250
Original issue's description:
> Simplify CanvasAsyncBlobCreator by removing ContextObserver and related tests
>
> After we confirm to use idle-tasks implementation in toBlob, the cancellation
> mechanism for async thread implementation is no longer useful. First, compositor
> thread is definitely alive when users open Chrome browser; so the alternative
> code path for PNG image encoding when compositor thread is disabled would be
> unreachable in real-world situations; as a result, PNG image encoding happens
> in idle tasks only. Second, JPEG and WEBP image formats do not have progressive
> encoding at this moment and thus cancellation mechanism is not useful to them
> either; once their progressive encoding implementations are completed, they
> would be moved over to idle-tasks implementation too.
>
> This patch removes ContextObserver and CanvasAsyncBlobCreatorTest; it also moves
> all layout tests that use toBlob on PNG image formats to virtual/threaded as
> idle tasks require compositor thread to be alive. There is no need to perform
> tests on toBlob (png) in scenarios when compositor thread is not available.
>
> BUG=581574
>
> Committed: https://crrev.com/d3991457ab5fcb905f2a8a07657e26b16b2974fa
> Cr-Commit-Position: refs/heads/master@{#373068}
TBR=junov@chromium.org,xlai@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=581574
Review URL: https://codereview.chromium.org/1660993002
Cr-Commit-Position: refs/heads/master@{#373250}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After we confirm to use idle-tasks implementation in toBlob, the cancellation
mechanism for async thread implementation is no longer useful. First, compositor
thread is definitely alive when users open Chrome browser; so the alternative
code path for PNG image encoding when compositor thread is disabled would be
unreachable in real-world situations; as a result, PNG image encoding happens
in idle tasks only. Second, JPEG and WEBP image formats do not have progressive
encoding at this moment and thus cancellation mechanism is not useful to them
either; once their progressive encoding implementations are completed, they
would be moved over to idle-tasks implementation too.
This patch removes ContextObserver and CanvasAsyncBlobCreatorTest; it also moves
all layout tests that use toBlob on PNG image formats to virtual/threaded as
idle tasks require compositor thread to be alive. There is no need to perform
tests on toBlob (png) in scenarios when compositor thread is not available.
BUG=581574
Review URL: https://codereview.chromium.org/1653253003
Cr-Commit-Position: refs/heads/master@{#373068}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not in the ImageBitmap spec yet, but it is part of the OffScreenCanvas
proposal. In the proposal, the words about this method are:
// It's crucial that there be a way to explicitly dispose of ImageBitmaps
// since they refer to potentially large graphics resources.
So this method is very similar to ImageData::dispose(), which explicitly
dispose any resources that ImageBitmap is associated with. At this moement,
ImageBitmap holds a RefPtr to a StaticBitmapImage, so the close() method
clears the RefPtr.
Since this method is not in the ImageBitmap spec yet, we should hide
it behind a RuntimeEnabled flag.
A layout test is also included in this CL. In particular, the width and
height of the ImageBitmap should be both 0 after calling the close() method.
The layout test also includes cases that calls close() to a already closed
ImageBitmap, or calls close() to a neutered ImageBitmap. In both cases,
the close() operation should be noop.
Now that we have three operations for ImageBitmap: structured clone (SK),
transfering (T) and close (C), we should test the behavior of combining them.
In my previous CLs: https://codereview.chromium.org/1647083003/,
https://codereview.chromium.org/1652553003/,
the cases of calling SK--T and T--SK have been tested. In this CL, the
layout test contains cases for calling SK--C, T--C, C--SK and C--T.
BUG=580649
Review URL: https://codereview.chromium.org/1631763004
Cr-Commit-Position: refs/heads/master@{#373050}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should test the behavior of combing the action of structured clone and
transfer. This CL adds a new layout test case, which applies transferring
an ImageBitmap to worker after structured clone is applied to the same
ImageBitmap. The expected behavior is that transferring would succeed
because structured cloning does not neuter the ImageBitmap.
A separate CL will be filed to test the case of applying structured clone
to a already neutered ImageBitmap (by transferring).
Review URL: https://codereview.chromium.org/1647083003
Cr-Commit-Position: refs/heads/master@{#372870}
|
|
|
|
|
|
|
|
|
|
|
| |
In this CL, we add a new layout test case that applies structured clone
to a neutered ImageBitmap after it was transfered to a worker. The expected
behavior is to throw an exception to user notifying that the ImageBitmap
has been neutered.
Review URL: https://codereview.chromium.org/1652553003
Cr-Commit-Position: refs/heads/master@{#372676}
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current implementation ignores the clipping region when calling addHitRegion().
In the past, we had no way to get the current clip path from canvas state stack
in Blink side but it's been possible since display list 2d canvas feature.
BUG=387057
Review URL: https://codereview.chromium.org/1630683002
Cr-Commit-Position: refs/heads/master@{#371832}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a combined revert of
https://codereview.chromium.org/1491653002
and https://codereview.chromium.org/1614173002. One more
additional edit is the addition of
"testRunner.dumpAsText();" in canvas-toBlob-defaultpng.html
and canvas-toBlob-toDataURL-race.js.
Reason for this revert is that we found out idle-task
performs much better (has less negative impacts on other
activities) than threaded implementation on majority of
machines.
BUG=581574
Review URL: https://codereview.chromium.org/1637163002
Cr-Commit-Position: refs/heads/master@{#371806}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ImageBitmap is already transferable, but at this moment we cannot use
postMessage(ImageBitmap) via structured clone. This CL will enable it.
This CL also includes a layout test and sends an ImageBitmap to a
worker, the worker sends the ImageBitmap back to main, and does check
that the underline pixel data survives the round trip.
BUG=579539
Review URL: https://codereview.chromium.org/1616213003
Cr-Commit-Position: refs/heads/master@{#371155}
|
|
|
|
|
|
|
|
|
|
| |
When a canvas has a filter but that filter is undefined (either
because it refers to a non-existent filter, or because that filter
is defined later), compositedDraw shouldn't be called.
Review URL: https://codereview.chromium.org/1606363002
Cr-Commit-Position: refs/heads/master@{#370994}
|
|
|
|
|
|
|
|
| |
BUG=564218
Review URL: https://codereview.chromium.org/1614173002
Cr-Commit-Position: refs/heads/master@{#370908}
|
|
|
|
|
|
|
|
|
|
| |
Recently there's a spec change: https://github.com/whatwg/html/pull/391.
BUG=568603
Review URL: https://codereview.chromium.org/1609313002
Cr-Commit-Position: refs/heads/master@{#370846}
|
|
|
|
|
|
|
|
|
|
|
|
| |
The equivalent bug for attached canvases was fixed in
http://crrev.com/370047, but unattached canvases were ignored
there.
BUG=561045
Review URL: https://codereview.chromium.org/1613193002
Cr-Commit-Position: refs/heads/master@{#370719}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are already covered in WebGL conformance tests.
Note that I only remove those who have exact corresponding tests in
conformance suite.
BUG=
TEST=layout tests
R=bajones@chromium.org,kbr@chromium.org
Review URL: https://codereview.chromium.org/1601093008
Cr-Commit-Position: refs/heads/master@{#370472}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Along with that, some of the layout tests results has to be updated.
Also, a layout test has been updated to show that the worker is
able to get width&height for an ImageBitmap.
The thread of Intent to ship ImageBitmap can be found here:
https://groups.google.com/a/chromium.org/d/topic/blink-dev/jRzvehX9U1U/discussion
BUG=563984
Review URL: https://codereview.chromium.org/1486663002
Cr-Commit-Position: refs/heads/master@{#370179}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this CL, we modify the behavior of the layout test for createImageBitmap
from a blob in worker in this way:
As soon as we postMessage the blob to worker, both the main thread and the
worker thread start createImageBitmap(blob) which means that the decoding
will happen at the same time. We call createImageBitmap(blob) in the worker
thread for only once but in the main thread we call it five times. The expected
result of this is that the created ImageBitmap from the main thread and
from the worker thread should have the same pixel data as the original blob.
Review URL: https://codereview.chromium.org/1574393009
Cr-Commit-Position: refs/heads/master@{#370124}
|
|
|
|
|
|
|
|
|
|
|
|
| |
The dw and dh parameters passed to drawImage should be 300x150, which is the default
size of canvas elment. Otherwise, the image will be scaled when drawing. This is why
the test fails.
BUG=577687
Review URL: https://codereview.chromium.org/1600603002
Cr-Commit-Position: refs/heads/master@{#370070}
|
|
|
|
|
|
|
|
|
|
|
| |
This adds layout tests that use hidpi and CSS scaling. This is a
follow-up to http://crrev.com/370047
BUG=561045
Review URL: https://codereview.chromium.org/1606673002
Cr-Commit-Position: refs/heads/master@{#370054}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When canvas filters specify a filter primitive subregion
(e.g. by specifying a width or height), filter building
depends on having an up to date canvas size; otherwise,
the crop rect computed for the filter is incorrect.
This CL directly passes the canvas size to filter building
code, rather than having the filter builder use a size
from the layout tree, since the latter might be stale.
BUG=561045
Review URL: https://codereview.chromium.org/1583103007
Cr-Commit-Position: refs/heads/master@{#370047}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Comparing Firefox's layout tests against Chrome's, we find that there are
two cases that is currently missing in our code base.
1). createImageBitmap from a neutered ImageBitmap.
2). createImageBitmap from a Blob object that is created by canvas.toBlob
This CL adds these two test cases.
Review URL: https://codereview.chromium.org/1589923002
Cr-Commit-Position: refs/heads/master@{#369443}
|
|
|
|
|
|
|
|
|
|
|
| |
This forwards the fill and stroke style from 2d canvas to the
FillPaint and StrokePaint inputs of canvas filters.
BUG=502877
Review URL: https://codereview.chromium.org/1543593002
Cr-Commit-Position: refs/heads/master@{#368726}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds a origin clean flag, such that in the case when the source
of the ImageBitmap contains cross-origin content, we can simply set this
flag instead of reject the promise.
BUG=569779
Committed: https://crrev.com/10b9b4435e25fb8ede2122482426ae81c7980630
Cr-Commit-Position: refs/heads/master@{#368595}
Review URL: https://codereview.chromium.org/1532473002
Cr-Commit-Position: refs/heads/master@{#368681}
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is fixing incorrect alignment of hit region on canvas when applied
css transform/width/height/padding/border or device pinch-zoom or high DPI.
Also, this CL adds/rewrites related tests.
BUG=328961,497750,519603
Review URL: https://codereview.chromium.org/1553373002
Cr-Commit-Position: refs/heads/master@{#368607}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
id:260001 of https://codereview.chromium.org/1532473002/ )
Reason for revert:
Seems to have broken Oilpan builds:
https://build.chromium.org/p/chromium.webkit/buildstatus?builder=WebKit%20Mac%20Oilpan&number=28566
https://build.chromium.org/p/chromium.webkit/buildstatus?builder=WebKit%20Linux%20Oilpan%20Builder&number=100
Original issue's description:
> Add a origin clean flag in ImageBitmap class
>
> This CL adds a origin clean flag, such that in the case when the source
> of the ImageBitmap contains cross-origin content, we can simply set this
> flag instead of reject the promise.
>
> BUG=569779
>
> Committed: https://crrev.com/10b9b4435e25fb8ede2122482426ae81c7980630
> Cr-Commit-Position: refs/heads/master@{#368595}
TBR=junov@chromium.org,xidachen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=569779
Review URL: https://codereview.chromium.org/1577783003
Cr-Commit-Position: refs/heads/master@{#368598}
|