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

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

Issue 806413004: Plumb allow_overlay flag for video path into cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed v4l2 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());
389 external_resources.release_callbacks.push_back( 391 external_resources.release_callbacks.push_back(
390 base::Bind(&ReturnTexture, AsWeakPtr(), video_frame)); 392 base::Bind(&ReturnTexture, AsWeakPtr(), video_frame));
391 return external_resources; 393 return external_resources;
392 } 394 }
393 395
394 // static 396 // static
395 void VideoResourceUpdater::RecycleResource( 397 void VideoResourceUpdater::RecycleResource(
396 base::WeakPtr<VideoResourceUpdater> updater, 398 base::WeakPtr<VideoResourceUpdater> updater,
397 ResourceProvider::ResourceId resource_id, 399 ResourceProvider::ResourceId resource_id,
398 uint32 sync_point, 400 uint32 sync_point,
(...skipping 22 matching lines...) Expand all
421 resource_it->ref_count = 0; 423 resource_it->ref_count = 0;
422 updater->DeleteResource(resource_it); 424 updater->DeleteResource(resource_it);
423 return; 425 return;
424 } 426 }
425 427
426 --resource_it->ref_count; 428 --resource_it->ref_count;
427 DCHECK_GE(resource_it->ref_count, 0); 429 DCHECK_GE(resource_it->ref_count, 0);
428 } 430 }
429 431
430 } // namespace cc 432 } // 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