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

Side by Side Diff: cc/layers/video_layer_impl.cc

Issue 1083683003: Speculative revert by sheriff (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed an unrelated commit that had accidentally slipped in. Created 5 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 | « cc/layers/video_frame_provider_client_impl.cc ('k') | cc/resources/display_item.h » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layers/video_layer_impl.h" 5 #include "cc/layers/video_layer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/layers/video_frame_provider_client_impl.h" 9 #include "cc/layers/video_frame_provider_client_impl.h"
10 #include "cc/quads/io_surface_draw_quad.h" 10 #include "cc/quads/io_surface_draw_quad.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 373 }
374 374
375 software_resources_.clear(); 375 software_resources_.clear();
376 software_release_callback_.Reset(); 376 software_release_callback_.Reset();
377 } else { 377 } else {
378 for (size_t i = 0; i < frame_resources_.size(); ++i) 378 for (size_t i = 0; i < frame_resources_.size(); ++i)
379 resource_provider->DeleteResource(frame_resources_[i]); 379 resource_provider->DeleteResource(frame_resources_[i]);
380 frame_resources_.clear(); 380 frame_resources_.clear();
381 } 381 }
382 382
383 provider_client_impl_->PutCurrentFrame(); 383 provider_client_impl_->PutCurrentFrame(frame_);
384 frame_ = nullptr; 384 frame_ = nullptr;
385 385
386 provider_client_impl_->ReleaseLock(); 386 provider_client_impl_->ReleaseLock();
387 } 387 }
388 388
389 void VideoLayerImpl::ReleaseResources() { 389 void VideoLayerImpl::ReleaseResources() {
390 updater_ = nullptr; 390 updater_ = nullptr;
391 } 391 }
392 392
393 void VideoLayerImpl::SetNeedsRedraw() { 393 void VideoLayerImpl::SetNeedsRedraw() {
394 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); 394 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds())));
395 layer_tree_impl()->SetNeedsRedraw(); 395 layer_tree_impl()->SetNeedsRedraw();
396 } 396 }
397 397
398 const char* VideoLayerImpl::LayerTypeAsString() const { 398 const char* VideoLayerImpl::LayerTypeAsString() const {
399 return "cc::VideoLayerImpl"; 399 return "cc::VideoLayerImpl";
400 } 400 }
401 401
402 } // namespace cc 402 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_frame_provider_client_impl.cc ('k') | cc/resources/display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698