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

Side by Side Diff: ppapi/examples/video_decode/video_decode.cc

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ppapi_unittests win x64 Created 5 years, 10 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
« no previous file with comments | « ppapi/examples/printing/printing.cc ('k') | ppapi/examples/video_decode/video_decode_dev.cc » ('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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 <stdio.h> 5 #include <stdio.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include <iostream> 8 #include <iostream>
9 #include <queue> 9 #include <queue>
10 #include <sstream> 10 #include <sstream>
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 assertNoGLError(); 655 assertNoGLError();
656 } 656 }
657 657
658 Shader MyInstance::CreateProgram(const char* vertex_shader, 658 Shader MyInstance::CreateProgram(const char* vertex_shader,
659 const char* fragment_shader) { 659 const char* fragment_shader) {
660 Shader shader; 660 Shader shader;
661 661
662 // Create shader program. 662 // Create shader program.
663 shader.program = gles2_if_->CreateProgram(context_->pp_resource()); 663 shader.program = gles2_if_->CreateProgram(context_->pp_resource());
664 CreateShader( 664 CreateShader(
665 shader.program, GL_VERTEX_SHADER, vertex_shader, strlen(vertex_shader)); 665 shader.program, GL_VERTEX_SHADER, vertex_shader,
666 static_cast<uint32_t>(strlen(vertex_shader)));
666 CreateShader(shader.program, 667 CreateShader(shader.program,
667 GL_FRAGMENT_SHADER, 668 GL_FRAGMENT_SHADER,
668 fragment_shader, 669 fragment_shader,
669 strlen(fragment_shader)); 670 static_cast<int>(strlen(fragment_shader)));
670 gles2_if_->LinkProgram(context_->pp_resource(), shader.program); 671 gles2_if_->LinkProgram(context_->pp_resource(), shader.program);
671 gles2_if_->UseProgram(context_->pp_resource(), shader.program); 672 gles2_if_->UseProgram(context_->pp_resource(), shader.program);
672 gles2_if_->Uniform1i( 673 gles2_if_->Uniform1i(
673 context_->pp_resource(), 674 context_->pp_resource(),
674 gles2_if_->GetUniformLocation( 675 gles2_if_->GetUniformLocation(
675 context_->pp_resource(), shader.program, "s_texture"), 676 context_->pp_resource(), shader.program, "s_texture"),
676 0); 677 0);
677 assertNoGLError(); 678 assertNoGLError();
678 679
679 shader.texcoord_scale_location = gles2_if_->GetUniformLocation( 680 shader.texcoord_scale_location = gles2_if_->GetUniformLocation(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 }; 728 };
728 729
729 } // anonymous namespace 730 } // anonymous namespace
730 731
731 namespace pp { 732 namespace pp {
732 // Factory function for your specialization of the Module object. 733 // Factory function for your specialization of the Module object.
733 Module* CreateModule() { 734 Module* CreateModule() {
734 return new MyModule(); 735 return new MyModule();
735 } 736 }
736 } // namespace pp 737 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/examples/printing/printing.cc ('k') | ppapi/examples/video_decode/video_decode_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698