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

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: Fix tests. Created 3 years, 6 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/layers/video_layer_impl_unittest.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 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 void VideoLayerImpl::SetNeedsRedraw() { 377 void VideoLayerImpl::SetNeedsRedraw() {
377 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); 378 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds())));
378 layer_tree_impl()->SetNeedsRedraw(); 379 layer_tree_impl()->SetNeedsRedraw();
379 } 380 }
380 381
381 const char* VideoLayerImpl::LayerTypeAsString() const { 382 const char* VideoLayerImpl::LayerTypeAsString() const {
382 return "cc::VideoLayerImpl"; 383 return "cc::VideoLayerImpl";
383 } 384 }
384 385
385 } // namespace cc 386 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/video_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698