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

Unified Diff: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp

Issue 2774903003: Fix the compositing of placeholder canvas backgrounds (Closed)
Patch Set: un-dupe function Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
index 8cdbb05dc1246699d64a6776a91c745599992618..71a48cd96f0beaf85abf08150ce8db1f76d5bcaf 100644
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
@@ -215,7 +215,6 @@ void OffscreenCanvasFrameDispatcherImpl::dispatchFrame(
const int renderPassId = 1;
std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
pass->SetNew(renderPassId, bounds, bounds, gfx::Transform());
- pass->has_transparent_background = false;
cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds, false, 1.f,
@@ -272,7 +271,10 @@ void OffscreenCanvasFrameDispatcherImpl::dispatchFrame(
pass->CreateAndAppendDrawQuad<cc::TextureDrawQuad>();
gfx::Size rectSize(m_width, m_height);
+ // TODO(crbug.com/705019): optimize for contexts that have {alpha: false}
const bool needsBlending = true;
+ gfx::Rect opaqueRect(0, 0);
+
// TOOD(crbug.com/645993): this should be inherited from WebGL context's
// creation settings.
const bool premultipliedAlpha = true;
@@ -284,7 +286,7 @@ void OffscreenCanvasFrameDispatcherImpl::dispatchFrame(
// TODO(crbug.com/645590): filter should respect the image-rendering CSS
// property of associated canvas element.
const bool nearestNeighbor = false;
- quad->SetAll(sqs, bounds, bounds, bounds, needsBlending, resource.id,
+ quad->SetAll(sqs, bounds, opaqueRect, bounds, needsBlending, resource.id,
gfx::Size(), premultipliedAlpha, uvTopLeft, uvBottomRight,
SK_ColorTRANSPARENT, vertexOpacity, yflipped, nearestNeighbor,
false);
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698