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

Side by Side Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 195973002: Change DCHECK_IS_ON() to DCHECK_IS_ON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep a comment Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/renderer/media/webmediaplayer_impl.h" 5 #include "content/renderer/media/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 gpu::MailboxHolder* mailbox_holder = video_frame->mailbox_holder(); 636 gpu::MailboxHolder* mailbox_holder = video_frame->mailbox_holder();
637 if (mailbox_holder->texture_target != GL_TEXTURE_2D) 637 if (mailbox_holder->texture_target != GL_TEXTURE_2D)
638 return false; 638 return false;
639 639
640 // Since this method changes which texture is bound to the TEXTURE_2D target, 640 // Since this method changes which texture is bound to the TEXTURE_2D target,
641 // ideally it would restore the currently-bound texture before returning. 641 // ideally it would restore the currently-bound texture before returning.
642 // The cost of getIntegerv is sufficiently high, however, that we want to 642 // The cost of getIntegerv is sufficiently high, however, that we want to
643 // avoid it in user builds. As a result assume (below) that |texture| is 643 // avoid it in user builds. As a result assume (below) that |texture| is
644 // bound when this method is called, and only verify this fact when 644 // bound when this method is called, and only verify this fact when
645 // DCHECK_IS_ON. 645 // DCHECK_IS_ON.
646 if (DCHECK_IS_ON()) { 646 #if DCHECK_IS_ON
647 GLint bound_texture = 0; 647 GLint bound_texture = 0;
648 web_graphics_context->getIntegerv(GL_TEXTURE_BINDING_2D, &bound_texture); 648 web_graphics_context->getIntegerv(GL_TEXTURE_BINDING_2D, &bound_texture);
649 DCHECK_EQ(static_cast<GLuint>(bound_texture), texture); 649 DCHECK_EQ(static_cast<GLuint>(bound_texture), texture);
650 } 650 #endif
651 651
652 uint32 source_texture = web_graphics_context->createTexture(); 652 uint32 source_texture = web_graphics_context->createTexture();
653 653
654 web_graphics_context->waitSyncPoint(mailbox_holder->sync_point); 654 web_graphics_context->waitSyncPoint(mailbox_holder->sync_point);
655 web_graphics_context->bindTexture(GL_TEXTURE_2D, source_texture); 655 web_graphics_context->bindTexture(GL_TEXTURE_2D, source_texture);
656 web_graphics_context->consumeTextureCHROMIUM(GL_TEXTURE_2D, 656 web_graphics_context->consumeTextureCHROMIUM(GL_TEXTURE_2D,
657 mailbox_holder->mailbox.name); 657 mailbox_holder->mailbox.name);
658 658
659 // The video is stored in a unmultiplied format, so premultiply 659 // The video is stored in a unmultiplied format, so premultiply
660 // if necessary. 660 // if necessary.
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 1322
1323 if (web_cdm_) { 1323 if (web_cdm_) {
1324 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); 1324 decryptor_ready_cb.Run(web_cdm_->GetDecryptor());
1325 return; 1325 return;
1326 } 1326 }
1327 1327
1328 decryptor_ready_cb_ = decryptor_ready_cb; 1328 decryptor_ready_cb_ = decryptor_ready_cb;
1329 } 1329 }
1330 1330
1331 } // namespace content 1331 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | gpu/command_buffer/service/test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698