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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 759573002: Set the internal format of hardware decoded texture to GL_RGBA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set format to GL_RGBA Created 6 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 | « no previous file | no next file » | 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 "content/common/gpu/media/gpu_video_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT); 370 NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT);
371 return; 371 return;
372 } 372 }
373 if (texture_target_ == GL_TEXTURE_EXTERNAL_OES || 373 if (texture_target_ == GL_TEXTURE_EXTERNAL_OES ||
374 texture_target_ == GL_TEXTURE_RECTANGLE) { 374 texture_target_ == GL_TEXTURE_RECTANGLE) {
375 // These textures have their dimensions defined by the underlying storage. 375 // These textures have their dimensions defined by the underlying storage.
376 // Use |texture_dimensions_| for this size. 376 // Use |texture_dimensions_| for this size.
377 texture_manager->SetLevelInfo(texture_ref, 377 texture_manager->SetLevelInfo(texture_ref,
378 texture_target_, 378 texture_target_,
379 0, 379 0,
380 0, 380 GL_RGBA,
381 texture_dimensions_.width(), 381 texture_dimensions_.width(),
382 texture_dimensions_.height(), 382 texture_dimensions_.height(),
383 1, 383 1,
384 0, 384 0,
385 0, 385 GL_RGBA,
386 0, 386 0,
387 false); 387 false);
388 } else { 388 } else {
389 // For other targets, texture dimensions should already be defined. 389 // For other targets, texture dimensions should already be defined.
390 GLsizei width = 0, height = 0; 390 GLsizei width = 0, height = 0;
391 info->GetLevelSize(texture_target_, 0, &width, &height); 391 info->GetLevelSize(texture_target_, 0, &width, &height);
392 if (width != texture_dimensions_.width() || 392 if (width != texture_dimensions_.width() ||
393 height != texture_dimensions_.height()) { 393 height != texture_dimensions_.height()) {
394 DLOG(ERROR) << "Size mismatch for texture id " << texture_ids[i]; 394 DLOG(ERROR) << "Size mismatch for texture id " << texture_ids[i];
395 NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT); 395 NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 return stub_->channel()->Send(message); 506 return stub_->channel()->Send(message);
507 } 507 }
508 508
509 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 509 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
510 bool succeeded) { 510 bool succeeded) {
511 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 511 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
512 Send(message); 512 Send(message);
513 } 513 }
514 514
515 } // namespace content 515 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698