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

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

Issue 2720803002: Pass returned resources to DidReceiveCompositorFrameAck (Closed)
Patch Set: c 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
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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 if (change_size_for_next_commit_) { 397 if (change_size_for_next_commit_) {
398 current_local_surface_id_ = local_surface_id_allocator_.GenerateId(); 398 current_local_surface_id_ = local_surface_id_allocator_.GenerateId();
399 change_size_for_next_commit_ = false; 399 change_size_for_next_commit_ = false;
400 } 400 }
401 401
402 sink_->SubmitCompositorFrame(current_local_surface_id_, std::move(frame)); 402 sink_->SubmitCompositorFrame(current_local_surface_id_, std::move(frame));
403 } 403 }
404 404
405 void OffscreenCanvasFrameDispatcherImpl::DidReceiveCompositorFrameAck() { 405 void OffscreenCanvasFrameDispatcherImpl::DidReceiveCompositorFrameAck(
406 const cc::ReturnedResourceArray& resources) {
407 ReclaimResources(resources);
406 // TODO(fsamuel): Implement this. 408 // TODO(fsamuel): Implement this.
407 } 409 }
408 410
409 void OffscreenCanvasFrameDispatcherImpl::SetNeedsBeginFrame( 411 void OffscreenCanvasFrameDispatcherImpl::SetNeedsBeginFrame(
410 bool needs_begin_frame) { 412 bool needs_begin_frame) {
411 if (sink_ && needs_begin_frame != needs_begin_frame_) { 413 if (sink_ && needs_begin_frame != needs_begin_frame_) {
412 needs_begin_frame_ = needs_begin_frame; 414 needs_begin_frame_ = needs_begin_frame;
413 sink_->SetNeedsBeginFrame(needs_begin_frame); 415 sink_->SetNeedsBeginFrame(needs_begin_frame);
414 } 416 }
415 } 417 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 477
476 void OffscreenCanvasFrameDispatcherImpl::Reshape(int width, int height) { 478 void OffscreenCanvasFrameDispatcherImpl::Reshape(int width, int height) {
477 if (width_ != width || height_ != height) { 479 if (width_ != width || height_ != height) {
478 width_ = width; 480 width_ = width;
479 height_ = height; 481 height_ = height;
480 change_size_for_next_commit_ = true; 482 change_size_for_next_commit_ = true;
481 } 483 }
482 } 484 }
483 485
484 } // namespace blink 486 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698