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

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

Issue 2517343003: Update Resize information from OffscreenCanvas to OffscreenCanvasFrameDispatcher (Closed)
Patch Set: fix error Created 4 years, 1 month 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/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h ('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 2e55452a62155a64c7bf79f261632dea6effb6a7..5d993e2df3bfe6a9c35ea5339248a6d41565cba9 100644
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
@@ -36,11 +36,10 @@ OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl(
int canvasId,
int width,
int height)
- : m_surfaceId(
- cc::FrameSinkId(clientId, sinkId),
- cc::LocalFrameId(
- localId,
- base::UnguessableToken::Deserialize(nonceHigh, nonceLow))),
+ : m_frameSinkId(cc::FrameSinkId(clientId, sinkId)),
+ m_currentLocalFrameId(cc::LocalFrameId(
+ localId,
+ base::UnguessableToken::Deserialize(nonceHigh, nonceLow))),
m_width(width),
m_height(height),
m_nextResourceId(1u),
@@ -50,7 +49,8 @@ OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl(
mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider;
Platform::current()->interfaceProvider()->getInterface(
mojo::GetProxy(&provider));
- provider->CreateCompositorFrameSink(m_surfaceId,
+ cc::SurfaceId surfaceId(m_frameSinkId, m_currentLocalFrameId);
+ provider->CreateCompositorFrameSink(surfaceId,
m_binding.CreateInterfacePtrAndBind(),
mojo::GetProxy(&m_sink));
}
@@ -358,7 +358,7 @@ void OffscreenCanvasFrameDispatcherImpl::dispatchFrame(
NOTREACHED();
}
- m_sink->SubmitCompositorFrame(m_surfaceId.local_frame_id(), std::move(frame));
+ m_sink->SubmitCompositorFrame(m_currentLocalFrameId, std::move(frame));
}
void OffscreenCanvasFrameDispatcherImpl::DidReceiveCompositorFrameAck() {
@@ -401,4 +401,9 @@ bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
return false;
}
+void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) {
+ m_width = width;
+ m_height = height;
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698