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

Side by Side Diff: media/gpu/ipc/service/gpu_video_decode_accelerator.cc

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: rebased Created 4 years 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 | « media/gpu/ipc/common/media_messages.h ('k') | media/video/picture.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/gpu/ipc/service/gpu_video_decode_accelerator.h" 5 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); 267 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id()));
268 } 268 }
269 269
270 AcceleratedVideoDecoderHostMsg_PictureReady_Params params; 270 AcceleratedVideoDecoderHostMsg_PictureReady_Params params;
271 params.picture_buffer_id = picture.picture_buffer_id(); 271 params.picture_buffer_id = picture.picture_buffer_id();
272 params.bitstream_buffer_id = picture.bitstream_buffer_id(); 272 params.bitstream_buffer_id = picture.bitstream_buffer_id();
273 params.visible_rect = picture.visible_rect(); 273 params.visible_rect = picture.visible_rect();
274 params.color_space = picture.color_space(); 274 params.color_space = picture.color_space();
275 params.allow_overlay = picture.allow_overlay(); 275 params.allow_overlay = picture.allow_overlay();
276 params.size_changed = picture.size_changed(); 276 params.size_changed = picture.size_changed();
277 params.surface_texture = picture.surface_texture();
278 params.wants_promotion_hint = picture.wants_promotion_hint();
277 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady(host_route_id_, 279 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady(host_route_id_,
278 params))) { 280 params))) {
279 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; 281 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed";
280 } 282 }
281 } 283 }
282 284
283 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( 285 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer(
284 int32_t bitstream_buffer_id) { 286 int32_t bitstream_buffer_id) {
285 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( 287 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed(
286 host_route_id_, bitstream_buffer_id))) { 288 host_route_id_, bitstream_buffer_id))) {
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 for (auto texture_ref : it->second) { 528 for (auto texture_ref : it->second) {
527 GLenum target = texture_ref->texture()->target(); 529 GLenum target = texture_ref->texture()->target();
528 gpu::gles2::TextureManager* texture_manager = 530 gpu::gles2::TextureManager* texture_manager =
529 stub_->decoder()->GetContextGroup()->texture_manager(); 531 stub_->decoder()->GetContextGroup()->texture_manager();
530 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); 532 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
531 } 533 }
532 uncleared_textures_.erase(it); 534 uncleared_textures_.erase(it);
533 } 535 }
534 536
535 } // namespace media 537 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/ipc/common/media_messages.h ('k') | media/video/picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698