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

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

Issue 2763223003: Reland of cc: Don't use StreamVideoDrawQuad on any platform but Android. (Closed)
Patch Set: Address Dana's comments. Fix unittest. Created 3 years, 9 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 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 updater_ = nullptr; 94 updater_ = nullptr;
95 95
96 provider_client_impl_->ReleaseLock(); 96 provider_client_impl_->ReleaseLock();
97 return false; 97 return false;
98 } 98 }
99 99
100 if (!LayerImpl::WillDraw(draw_mode, resource_provider)) 100 if (!LayerImpl::WillDraw(draw_mode, resource_provider))
101 return false; 101 return false;
102 102
103 if (!updater_) { 103 if (!updater_) {
104 updater_.reset( 104 updater_.reset(new VideoResourceUpdater(
105 new VideoResourceUpdater(layer_tree_impl()->context_provider(), 105 layer_tree_impl()->context_provider(),
106 layer_tree_impl()->resource_provider())); 106 layer_tree_impl()->resource_provider(),
107 layer_tree_impl()->settings().use_stream_video_draw_quad));
107 } 108 }
108 109
109 VideoFrameExternalResources external_resources = 110 VideoFrameExternalResources external_resources =
110 updater_->CreateExternalResourcesFromVideoFrame(frame_); 111 updater_->CreateExternalResourcesFromVideoFrame(frame_);
111 frame_resource_type_ = external_resources.type; 112 frame_resource_type_ = external_resources.type;
112 113
113 if (external_resources.type == 114 if (external_resources.type ==
114 VideoFrameExternalResources::SOFTWARE_RESOURCE) { 115 VideoFrameExternalResources::SOFTWARE_RESOURCE) {
115 software_resources_ = external_resources.software_resources; 116 software_resources_ = external_resources.software_resources;
116 software_release_callback_ = 117 software_release_callback_ =
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 void VideoLayerImpl::SetNeedsRedraw() { 373 void VideoLayerImpl::SetNeedsRedraw() {
373 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); 374 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds())));
374 layer_tree_impl()->SetNeedsRedraw(); 375 layer_tree_impl()->SetNeedsRedraw();
375 } 376 }
376 377
377 const char* VideoLayerImpl::LayerTypeAsString() const { 378 const char* VideoLayerImpl::LayerTypeAsString() const {
378 return "cc::VideoLayerImpl"; 379 return "cc::VideoLayerImpl";
379 } 380 }
380 381
381 } // namespace cc 382 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/video_resource_updater.h » ('j') | cc/resources/video_resource_updater.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698