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

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

Issue 2801313002: Remove MojoCompositorFrameSink::WillDrawSurface (Closed)
Patch Set: Address Nit Created 3 years, 8 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // the MailTextureHolder to a SkiaTextureHolder. In this case, we 443 // the MailTextureHolder to a SkiaTextureHolder. In this case, we
444 // need to wait for the new sync token passed by CompositorFrameSink. 444 // need to wait for the new sync token passed by CompositorFrameSink.
445 SharedGpuContext::Gl()->WaitSyncTokenCHROMIUM( 445 SharedGpuContext::Gl()->WaitSyncTokenCHROMIUM(
446 resource.sync_token.GetConstData()); 446 resource.sync_token.GetConstData());
447 } 447 }
448 } 448 }
449 ReclaimResource(resource.id); 449 ReclaimResource(resource.id);
450 } 450 }
451 } 451 }
452 452
453 void OffscreenCanvasFrameDispatcherImpl::WillDrawSurface(
454 const cc::LocalSurfaceId& local_surface_id,
455 ::gfx::mojom::blink::RectPtr damage_rect) {
456 // TODO(fsamuel, staraz): Implement this.
457 }
458
459 void OffscreenCanvasFrameDispatcherImpl::ReclaimResource(unsigned resource_id) { 453 void OffscreenCanvasFrameDispatcherImpl::ReclaimResource(unsigned resource_id) {
460 // An image resource needs to be returned by both the 454 // An image resource needs to be returned by both the
461 // CompositorFrameSink and the HTMLCanvasElement. These 455 // CompositorFrameSink and the HTMLCanvasElement. These
462 // events can happen in any order. The first of the two 456 // events can happen in any order. The first of the two
463 // to return a given resource will result in the spare 457 // to return a given resource will result in the spare
464 // resource lock being lifted, and the second will delete 458 // resource lock being lifted, and the second will delete
465 // the resource for real. 459 // the resource for real.
466 if (spare_resource_locks_.Contains(resource_id)) { 460 if (spare_resource_locks_.Contains(resource_id)) {
467 spare_resource_locks_.erase(resource_id); 461 spare_resource_locks_.erase(resource_id);
468 return; 462 return;
(...skipping 12 matching lines...) Expand all
481 475
482 void OffscreenCanvasFrameDispatcherImpl::Reshape(int width, int height) { 476 void OffscreenCanvasFrameDispatcherImpl::Reshape(int width, int height) {
483 if (width_ != width || height_ != height) { 477 if (width_ != width || height_ != height) {
484 width_ = width; 478 width_ = width;
485 height_ = height; 479 height_ = height;
486 change_size_for_next_commit_ = true; 480 change_size_for_next_commit_ = true;
487 } 481 }
488 } 482 }
489 483
490 } // namespace blink 484 } // 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