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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp

Issue 2701663003: CompositorFrameSinkSupportClient::WillDraw needs to take in arguments (Closed)
Patch Set: c Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h" 5 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/quads/texture_draw_quad.h" 8 #include "cc/quads/texture_draw_quad.h"
9 #include "gpu/command_buffer/client/gles2_interface.h" 9 #include "gpu/command_buffer/client/gles2_interface.h"
10 #include "platform/CrossThreadFunctional.h" 10 #include "platform/CrossThreadFunctional.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 void OffscreenCanvasFrameDispatcherImpl::ReclaimResources( 403 void OffscreenCanvasFrameDispatcherImpl::ReclaimResources(
404 const cc::ReturnedResourceArray& resources) { 404 const cc::ReturnedResourceArray& resources) {
405 for (const auto& resource : resources) { 405 for (const auto& resource : resources) {
406 RefPtr<StaticBitmapImage> image = m_cachedImages.get(resource.id); 406 RefPtr<StaticBitmapImage> image = m_cachedImages.get(resource.id);
407 if (image) 407 if (image)
408 image->updateSyncToken(resource.sync_token); 408 image->updateSyncToken(resource.sync_token);
409 reclaimResource(resource.id); 409 reclaimResource(resource.id);
410 } 410 }
411 } 411 }
412 412
413 void OffscreenCanvasFrameDispatcherImpl::WillDrawSurface() { 413 void OffscreenCanvasFrameDispatcherImpl::WillDrawSurface(
414 const cc::LocalSurfaceId& localSurfaceId,
415 ::gfx::mojom::blink::RectPtr damageRect) {
414 // TODO(fsamuel, staraz): Implement this. 416 // TODO(fsamuel, staraz): Implement this.
415 } 417 }
416 418
417 void OffscreenCanvasFrameDispatcherImpl::reclaimResource(unsigned resourceId) { 419 void OffscreenCanvasFrameDispatcherImpl::reclaimResource(unsigned resourceId) {
418 // An image resource needs to be returned by both the 420 // An image resource needs to be returned by both the
419 // CompositorFrameSink and the HTMLCanvasElement. These 421 // CompositorFrameSink and the HTMLCanvasElement. These
420 // events can happen in any order. The first of the two 422 // events can happen in any order. The first of the two
421 // to return a given resource will result in the spare 423 // to return a given resource will result in the spare
422 // resource lock being lifted, and the second will delete 424 // resource lock being lifted, and the second will delete
423 // the resource for real. 425 // the resource for real.
(...skipping 15 matching lines...) Expand all
439 441
440 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) { 442 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) {
441 if (m_width != width || m_height != height) { 443 if (m_width != width || m_height != height) {
442 m_width = width; 444 m_width = width;
443 m_height = height; 445 m_height = height;
444 m_changeSizeForNextCommit = true; 446 m_changeSizeForNextCommit = true;
445 } 447 }
446 } 448 }
447 449
448 } // namespace blink 450 } // namespace blink
OLDNEW
« 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