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

Side by Side Diff: cc/resources/video_resource_updater.cc

Issue 881893002: Revert of Plumb allow_overlay flag for video path into cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/resources/video_resource_updater.h" 5 #include "cc/resources/video_resource_updater.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 break; 379 break;
380 default: 380 default:
381 NOTREACHED(); 381 NOTREACHED();
382 return VideoFrameExternalResources(); 382 return VideoFrameExternalResources();
383 } 383 }
384 384
385 external_resources.mailboxes.push_back( 385 external_resources.mailboxes.push_back(
386 TextureMailbox(mailbox_holder->mailbox, 386 TextureMailbox(mailbox_holder->mailbox,
387 mailbox_holder->texture_target, 387 mailbox_holder->texture_target,
388 mailbox_holder->sync_point)); 388 mailbox_holder->sync_point));
389 external_resources.mailboxes.back().set_allow_overlay(
390 video_frame->allow_overlay());
391 external_resources.release_callbacks.push_back( 389 external_resources.release_callbacks.push_back(
392 base::Bind(&ReturnTexture, AsWeakPtr(), video_frame)); 390 base::Bind(&ReturnTexture, AsWeakPtr(), video_frame));
393 return external_resources; 391 return external_resources;
394 } 392 }
395 393
396 // static 394 // static
397 void VideoResourceUpdater::RecycleResource( 395 void VideoResourceUpdater::RecycleResource(
398 base::WeakPtr<VideoResourceUpdater> updater, 396 base::WeakPtr<VideoResourceUpdater> updater,
399 ResourceProvider::ResourceId resource_id, 397 ResourceProvider::ResourceId resource_id,
400 uint32 sync_point, 398 uint32 sync_point,
(...skipping 22 matching lines...) Expand all
423 resource_it->ref_count = 0; 421 resource_it->ref_count = 0;
424 updater->DeleteResource(resource_it); 422 updater->DeleteResource(resource_it);
425 return; 423 return;
426 } 424 }
427 425
428 --resource_it->ref_count; 426 --resource_it->ref_count;
429 DCHECK_GE(resource_it->ref_count, 0); 427 DCHECK_GE(resource_it->ref_count, 0);
430 } 428 }
431 429
432 } // namespace cc 430 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698