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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 23542060: Use GL_TEXTURE_2D for pixel readback path in GpuVideoAcceleratorFactories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: 58c9bd02 git cl format Created 7 years, 2 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) 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/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 weak_this_, 441 weak_this_,
442 picture.picture_buffer_id()))), 442 picture.picture_buffer_id()))),
443 decoder_texture_target_, 443 decoder_texture_target_,
444 pb.size(), 444 pb.size(),
445 visible_rect, 445 visible_rect,
446 natural_size, 446 natural_size,
447 timestamp, 447 timestamp,
448 base::Bind(&GpuVideoAcceleratorFactories::ReadPixels, 448 base::Bind(&GpuVideoAcceleratorFactories::ReadPixels,
449 factories_, 449 factories_,
450 pb.texture_id(), 450 pb.texture_id(),
451 decoder_texture_target_,
452 gfx::Size(visible_rect.width(), visible_rect.height())), 451 gfx::Size(visible_rect.width(), visible_rect.height())),
453 base::Closure())); 452 base::Closure()));
454 CHECK_GT(available_pictures_, 0); 453 CHECK_GT(available_pictures_, 0);
455 --available_pictures_; 454 --available_pictures_;
456 bool inserted = 455 bool inserted =
457 picture_buffers_at_display_.insert(picture.picture_buffer_id()).second; 456 picture_buffers_at_display_.insert(picture.picture_buffer_id()).second;
458 DCHECK(inserted); 457 DCHECK(inserted);
459 458
460 EnqueueFrameAndTriggerFrameDelivery(frame); 459 EnqueueFrameAndTriggerFrameDelivery(frame);
461 } 460 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 606
608 state_ = kError; 607 state_ = kError;
609 608
610 if (!pending_decode_cb_.is_null()) { 609 if (!pending_decode_cb_.is_null()) {
611 base::ResetAndReturn(&pending_decode_cb_).Run(kDecodeError, NULL); 610 base::ResetAndReturn(&pending_decode_cb_).Run(kDecodeError, NULL);
612 return; 611 return;
613 } 612 }
614 } 613 }
615 614
616 } // namespace media 615 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_accelerator_factories.h ('k') | media/filters/mock_gpu_video_accelerator_factories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698