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

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

Issue 1195473003: cc: Set read lock fences required for YUV native video frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable read lock fences for all the native planes. Created 5 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/resources/resource_provider.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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 external_resources.software_release_callback; 117 external_resources.software_release_callback;
118 return true; 118 return true;
119 } 119 }
120 120
121 DCHECK_EQ(external_resources.mailboxes.size(), 121 DCHECK_EQ(external_resources.mailboxes.size(),
122 external_resources.release_callbacks.size()); 122 external_resources.release_callbacks.size());
123 for (size_t i = 0; i < external_resources.mailboxes.size(); ++i) { 123 for (size_t i = 0; i < external_resources.mailboxes.size(); ++i) {
124 unsigned resource_id = resource_provider->CreateResourceFromTextureMailbox( 124 unsigned resource_id = resource_provider->CreateResourceFromTextureMailbox(
125 external_resources.mailboxes[i], 125 external_resources.mailboxes[i],
126 SingleReleaseCallbackImpl::Create( 126 SingleReleaseCallbackImpl::Create(
127 external_resources.release_callbacks[i])); 127 external_resources.release_callbacks[i]),
128 external_resources.read_lock_fences_enabled);
128 frame_resources_.push_back(FrameResource( 129 frame_resources_.push_back(FrameResource(
129 resource_id, external_resources.mailboxes[i].size_in_pixels(), 130 resource_id, external_resources.mailboxes[i].size_in_pixels(),
130 external_resources.mailboxes[i].allow_overlay())); 131 external_resources.mailboxes[i].allow_overlay()));
131 } 132 }
132 133
133 return true; 134 return true;
134 } 135 }
135 136
136 void VideoLayerImpl::AppendQuads(RenderPass* render_pass, 137 void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
137 AppendQuadsData* append_quads_data) { 138 AppendQuadsData* append_quads_data) {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 void VideoLayerImpl::SetNeedsRedraw() { 403 void VideoLayerImpl::SetNeedsRedraw() {
403 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); 404 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds())));
404 layer_tree_impl()->SetNeedsRedraw(); 405 layer_tree_impl()->SetNeedsRedraw();
405 } 406 }
406 407
407 const char* VideoLayerImpl::LayerTypeAsString() const { 408 const char* VideoLayerImpl::LayerTypeAsString() const {
408 return "cc::VideoLayerImpl"; 409 return "cc::VideoLayerImpl";
409 } 410 }
410 411
411 } // namespace cc 412 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698