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

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

Issue 1275773003: gpu: support GL_TEXTURE_CUBE_MAP destination target to Copy(Sub)TextureCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Choose correct and expensive way Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/android_video_decode_accelerator.h" 5 #include "content/common/gpu/media/android_video_decode_accelerator.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 "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // 1. Once we call detachFrameGLContext(), it deletes the texture previous 353 // 1. Once we call detachFrameGLContext(), it deletes the texture previous
354 // attached. 354 // attached.
355 // 2. SurfaceTexture requires us to apply a transform matrix when we show 355 // 2. SurfaceTexture requires us to apply a transform matrix when we show
356 // the texture. 356 // the texture.
357 // TODO(hkuang): get the StreamTexture transform matrix in GPU process 357 // TODO(hkuang): get the StreamTexture transform matrix in GPU process
358 // instead of using default matrix crbug.com/226218. 358 // instead of using default matrix crbug.com/226218.
359 const static GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f, 359 const static GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f,
360 0.0f, 1.0f, 0.0f, 0.0f, 360 0.0f, 1.0f, 0.0f, 0.0f,
361 0.0f, 0.0f, 1.0f, 0.0f, 361 0.0f, 0.0f, 1.0f, 0.0f,
362 0.0f, 0.0f, 0.0f, 1.0f}; 362 0.0f, 0.0f, 0.0f, 1.0f};
363 copier_->DoCopyTextureWithTransform(gl_decoder_.get(), 363 copier_->DoCopyTextureWithTransform(
364 GL_TEXTURE_EXTERNAL_OES, 364 gl_decoder_.get(), GL_TEXTURE_EXTERNAL_OES, surface_texture_id_,
365 surface_texture_id_, 365 GL_TEXTURE_2D, picture_buffer_texture_id, GL_RGBA, GL_UNSIGNED_BYTE,
366 picture_buffer_texture_id, 366 size_.width(), size_.height(), false, false, false, true, default_matrix);
367 size_.width(),
368 size_.height(),
369 false,
370 false,
371 false,
372 default_matrix);
373 367
374 base::MessageLoop::current()->PostTask( 368 base::MessageLoop::current()->PostTask(
375 FROM_HERE, base::Bind(&AndroidVideoDecodeAccelerator::NotifyPictureReady, 369 FROM_HERE, base::Bind(&AndroidVideoDecodeAccelerator::NotifyPictureReady,
376 weak_this_factory_.GetWeakPtr(), 370 weak_this_factory_.GetWeakPtr(),
377 media::Picture(picture_buffer_id, bitstream_id, 371 media::Picture(picture_buffer_id, bitstream_id,
378 gfx::Rect(size_), false))); 372 gfx::Rect(size_), false)));
379 } 373 }
380 374
381 void AndroidVideoDecodeAccelerator::Decode( 375 void AndroidVideoDecodeAccelerator::Decode(
382 const media::BitstreamBuffer& bitstream_buffer) { 376 const media::BitstreamBuffer& bitstream_buffer) {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 } 558 }
565 SupportedProfile profile; 559 SupportedProfile profile;
566 profile.profile = media::VP8PROFILE_ANY; 560 profile.profile = media::VP8PROFILE_ANY;
567 profile.min_resolution.SetSize(16, 16); 561 profile.min_resolution.SetSize(16, 16);
568 profile.max_resolution.SetSize(1920, 1088); 562 profile.max_resolution.SetSize(1920, 1088);
569 profiles.push_back(profile); 563 profiles.push_back(profile);
570 return profiles; 564 return profiles;
571 } 565 }
572 566
573 } // namespace content 567 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698