Commit b47e683b authored by Kunihiko Sakamoto's avatar Kunihiko Sakamoto Committed by Commit Bot

Revert "Ignore CanvasResourceProvider::Clear in OOPR Mode"

This reverts commit 84c360e5.

Reason for revert: Suspect this CL causes OOPBrowserTest.Basic failure on linux-trusty-rel

https://ci.chromium.org/p/chromium/builders/ci/linux-trusty-rel/12426

Original change's description:
> Ignore CanvasResourceProvider::Clear in OOPR Mode
> 
> In OOPR Canvas2D we no longer have access to Skia in the client process.
> We need to update CanvasResourceProvider::Clear to not access SkCanvas
> in the case of OOPR. A more ideal fix is tracked in
> https://crbug.com/1090081 but simply ignoring it is fine for now as
> OOPR automatically handles clearing the canvas during initialization.
> 
> Bug: 1090083
> Change-Id: I5fb75e4fac312ec00b8e5215d3756219672461ee
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2236193
> Commit-Queue: Nathan Zabriskie <nazabris@microsoft.com>
> Reviewed-by: Khushal <khushalsagar@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#776618}

TBR=khushalsagar@chromium.org,nazabris@microsoft.com

Change-Id: Ib906f07089a6b48eaf3e4b1f13fcfeae9d9b0896
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1090083
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2237572Reviewed-by: default avatarKunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776782}
parent 6c901cd5
......@@ -1150,20 +1150,6 @@ bool CanvasResourceProvider::WritePixels(const SkImageInfo& orig_info,
}
void CanvasResourceProvider::Clear() {
// We don't have an SkCanvas in OOPR mode so we can't do the clear below, plus
// OOPR already clears the canvas in BeginRaster.
if (IsAccelerated()) {
if (!ContextProviderWrapper())
return;
if (ContextProviderWrapper()
->ContextProvider()
->GetCapabilities()
.supports_oop_raster) {
return;
}
}
// Clear the background transparent or opaque, as required. This should only
// be called when a new resource provider is created to ensure that we're
// not leaking data or displaying bad pixels (in the case of kOpaque
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment