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

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

Issue 2920893003: Revert of cc: Don't use StreamVideoDrawQuad on any platform but Android. (Closed)
Patch Set: Fix merge conflict. 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/output/renderer_pixeltest.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(new VideoResourceUpdater( 104 updater_.reset(
105 layer_tree_impl()->context_provider(), 105 new VideoResourceUpdater(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));
108 } 107 }
109 108
110 VideoFrameExternalResources external_resources = 109 VideoFrameExternalResources external_resources =
111 updater_->CreateExternalResourcesFromVideoFrame(frame_); 110 updater_->CreateExternalResourcesFromVideoFrame(frame_);
112 frame_resource_type_ = external_resources.type; 111 frame_resource_type_ = external_resources.type;
113 112
114 if (external_resources.type == 113 if (external_resources.type ==
115 VideoFrameExternalResources::SOFTWARE_RESOURCE) { 114 VideoFrameExternalResources::SOFTWARE_RESOURCE) {
116 software_resources_ = external_resources.software_resources; 115 software_resources_ = external_resources.software_resources;
117 software_release_callback_ = 116 software_release_callback_ =
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 void VideoLayerImpl::SetNeedsRedraw() { 373 void VideoLayerImpl::SetNeedsRedraw() {
375 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); 374 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds())));
376 layer_tree_impl()->SetNeedsRedraw(); 375 layer_tree_impl()->SetNeedsRedraw();
377 } 376 }
378 377
379 const char* VideoLayerImpl::LayerTypeAsString() const { 378 const char* VideoLayerImpl::LayerTypeAsString() const {
380 return "cc::VideoLayerImpl"; 379 return "cc::VideoLayerImpl";
381 } 380 }
382 381
383 } // namespace cc 382 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698