Lines Matching full:program
394 const TileCheckerboardProgram* program = GetTileCheckerboardProgram();
395 DCHECK(program && (program->initialized() || IsContextLost()));
396 SetUseProgram(program->program());
400 Context()->uniform4f(program->fragment_shader().color_location(),
415 Context()->uniform4f(program->fragment_shader().tex_transform_location(),
422 Context()->uniform1f(program->fragment_shader().frequency_location(),
426 program->fragment_shader().alpha_location());
430 program->vertex_shader().matrix_location());
438 const DebugBorderProgram* program = GetDebugBorderProgram();
439 DCHECK(program && (program->initialized() || IsContextLost()));
440 SetUseProgram(program->program());
453 program->vertex_shader().matrix_location(), 1, false, &gl_matrix[0]));
459 Context()->uniform4f(program->fragment_shader().color_location(),
873 const RenderPassMaskProgramAA* program =
875 SetUseProgram(program->program());
877 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
879 shader_quad_location = program->vertex_shader().quad_location();
880 shader_edge_location = program->vertex_shader().edge_location();
881 shader_viewport_location = program->vertex_shader().viewport_location();
883 program->fragment_shader().mask_sampler_location();
885 program->fragment_shader().mask_tex_coord_scale_location();
887 program->fragment_shader().mask_tex_coord_offset_location();
888 shader_matrix_location = program->vertex_shader().matrix_location();
889 shader_alpha_location = program->fragment_shader().alpha_location();
891 program->vertex_shader().tex_transform_location();
893 const RenderPassMaskProgram* program =
895 SetUseProgram(program->program());
897 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
900 program->fragment_shader().mask_sampler_location();
902 program->fragment_shader().mask_tex_coord_scale_location();
904 program->fragment_shader().mask_tex_coord_offset_location();
905 shader_matrix_location = program->vertex_shader().matrix_location();
906 shader_alpha_location = program->fragment_shader().alpha_location();
908 program->vertex_shader().tex_transform_location();
910 const RenderPassProgramAA* program =
912 SetUseProgram(program->program());
914 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
916 shader_quad_location = program->vertex_shader().quad_location();
917 shader_edge_location = program->vertex_shader().edge_location();
918 shader_viewport_location = program->vertex_shader().viewport_location();
919 shader_matrix_location = program->vertex_shader().matrix_location();
920 shader_alpha_location = program->fragment_shader().alpha_location();
922 program->vertex_shader().tex_transform_location();
924 const RenderPassMaskColorMatrixProgramAA* program =
926 SetUseProgram(program->program());
928 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
930 shader_matrix_location = program->vertex_shader().matrix_location();
931 shader_quad_location = program->vertex_shader().quad_location();
933 program->vertex_shader().tex_transform_location();
934 shader_edge_location = program->vertex_shader().edge_location();
935 shader_viewport_location = program->vertex_shader().viewport_location();
936 shader_alpha_location = program->fragment_shader().alpha_location();
938 program->fragment_shader().mask_sampler_location();
940 program->fragment_shader().mask_tex_coord_scale_location();
942 program->fragment_shader().mask_tex_coord_offset_location();
944 program->fragment_shader().color_matrix_location();
946 program->fragment_shader().color_offset_location();
948 const RenderPassColorMatrixProgramAA* program =
950 SetUseProgram(program->program());
952 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
954 shader_matrix_location = program->vertex_shader().matrix_location();
955 shader_quad_location = program->vertex_shader().quad_location();
957 program->vertex_shader().tex_transform_location();
958 shader_edge_location = program->vertex_shader().edge_location();
959 shader_viewport_location = program->vertex_shader().viewport_location();
960 shader_alpha_location = program->fragment_shader().alpha_location();
962 program->fragment_shader().color_matrix_location();
964 program->fragment_shader().color_offset_location();
966 const RenderPassMaskColorMatrixProgram* program =
968 SetUseProgram(program->program());
970 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
972 shader_matrix_location = program->vertex_shader().matrix_location();
974 program->vertex_shader().tex_transform_location();
976 program->fragment_shader().mask_sampler_location();
978 program->fragment_shader().mask_tex_coord_scale_location();
980 program->fragment_shader().mask_tex_coord_offset_location();
981 shader_alpha_location = program->fragment_shader().alpha_location();
983 program->fragment_shader().color_matrix_location();
985 program->fragment_shader().color_offset_location();
987 const RenderPassColorMatrixProgram* program =
989 SetUseProgram(program->program());
991 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
993 shader_matrix_location = program->vertex_shader().matrix_location();
995 program->vertex_shader().tex_transform_location();
996 shader_alpha_location = program->fragment_shader().alpha_location();
998 program->fragment_shader().color_matrix_location();
1000 program->fragment_shader().color_offset_location();
1002 const RenderPassProgram* program =
1004 SetUseProgram(program->program());
1006 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
1008 shader_matrix_location = program->vertex_shader().matrix_location();
1009 shader_alpha_location = program->fragment_shader().alpha_location();
1011 program->vertex_shader().tex_transform_location();
1114 unsigned program;
1123 static void SolidColorUniformLocation(T program,
1125 uniforms->program = program->program();
1126 uniforms->matrix_location = program->vertex_shader().matrix_location();
1127 uniforms->viewport_location = program->vertex_shader().viewport_location();
1128 uniforms->quad_location = program->vertex_shader().quad_location();
1129 uniforms->edge_location = program->vertex_shader().edge_location();
1130 uniforms->color_location = program->fragment_shader().color_location();
1249 SetUseProgram(uniforms.program);
1290 unsigned program;
1302 static void TileUniformLocation(T program, TileProgramUniforms* uniforms) {
1303 uniforms->program = program->program();
1304 uniforms->matrix_location = program->vertex_shader().matrix_location();
1305 uniforms->viewport_location = program->vertex_shader().viewport_location();
1306 uniforms->quad_location = program->vertex_shader().quad_location();
1307 uniforms->edge_location = program->vertex_shader().edge_location();
1309 program->vertex_shader().vertex_tex_transform_location();
1311 uniforms->sampler_location = program->fragment_shader().sampler_location();
1312 uniforms->alpha_location = program->fragment_shader().alpha_location();
1314 program->fragment_shader().fragment_tex_transform_location();
1419 SetUseProgram(uniforms.program);
1541 const VideoYUVAProgram* program = GetVideoYUVAProgram(tex_coord_precision);
1542 DCHECK(program && (program->initialized() || IsContextLost()));
1543 SetUseProgram(program->program());
1544 tex_scale_location = program->vertex_shader().tex_scale_location();
1545 matrix_location = program->vertex_shader().matrix_location();
1546 y_texture_location = program->fragment_shader().y_texture_location();
1547 u_texture_location = program->fragment_shader().u_texture_location();
1548 v_texture_location = program->fragment_shader().v_texture_location();
1549 a_texture_location = program->fragment_shader().a_texture_location();
1550 yuv_matrix_location = program->fragment_shader().yuv_matrix_location();
1551 yuv_adj_location = program->fragment_shader().yuv_adj_location();
1552 alpha_location = program->fragment_shader().alpha_location();
1554 const VideoYUVProgram* program = GetVideoYUVProgram(tex_coord_precision);
1555 DCHECK(program && (program->initialized() || IsContextLost()));
1556 SetUseProgram(program->program());
1557 tex_scale_location = program->vertex_shader().tex_scale_location();
1558 matrix_location = program->vertex_shader().matrix_location();
1559 y_texture_location = program->fragment_shader().y_texture_location();
1560 u_texture_location = program->fragment_shader().u_texture_location();
1561 v_texture_location = program->fragment_shader().v_texture_location();
1562 yuv_matrix_location = program->fragment_shader().yuv_matrix_location();
1563 yuv_adj_location = program->fragment_shader().yuv_adj_location();
1564 alpha_location = program->fragment_shader().alpha_location();
1614 const VideoStreamTextureProgram* program =
1616 SetUseProgram(program->program());
1621 program->vertex_shader().tex_matrix_location(), 1, false, gl_matrix));
1630 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
1633 program->fragment_shader().alpha_location());
1637 program->vertex_shader().matrix_location());
1726 template <class Program>
1727 void Set(Program* program, WebKit::WebGraphicsContext3D* context) {
1728 DCHECK(program && (program->initialized() || context->isContextLost()));
1729 program_id = program->program();
1730 sampler_location = program->fragment_shader().sampler_location();
1731 matrix_location = program->vertex_shader().matrix_location();
1733 program->fragment_shader().background_color_location();
1742 template <class Program>
1743 void Set(Program* program, WebKit::WebGraphicsContext3D* context) {
1744 TextureProgramBinding::Set(program, context);
1745 tex_transform_location = program->vertex_shader().tex_transform_location();
1747 program->vertex_shader().vertex_opacity_location();
1761 // Bind the program to the GL state.
1827 // Choose the correct texture program binding
2023 void GLRenderer::SetUseProgram(unsigned program) {
2024 if (program == program_shadow_)
2026 GLC(context_, context_->useProgram(program));
2027 program_shadow_ = program;
2053 const RenderPassProgram* program = GetRenderPassProgram(tex_coord_precision);
2054 SetUseProgram(program->program());
2057 program->fragment_shader().sampler_location(), 0));
2061 program->vertex_shader().tex_transform_location(),
2068 program->vertex_shader().tex_transform_location(),
2075 SetShaderOpacity(1.f, program->fragment_shader().alpha_location());
2079 frame, draw_matrix, rect, program->vertex_shader().matrix_location());
2651 scoped_ptr<RenderPassProgram>& program =
2654 DCHECK(program);
2655 if (!program->initialized()) {
2657 program->Initialize(context_, is_using_bind_uniform_);
2659 return program.get();
2664 scoped_ptr<RenderPassProgramAA>& program =
2667 if (!program)
2668 program =
2670 if (!program->initialized()) {
2672 program->Initialize(context_, is_using_bind_uniform_);
2674 return program.get();
2679 scoped_ptr<RenderPassMaskProgram>& program =
2682 if (!program)
2683 program = make_scoped_ptr(new RenderPassMaskProgram(context_, precision));
2684 if (!program->initialized()) {
2686 program->Initialize(context_, is_using_bind_uniform_);
2688 return program.get();
2693 scoped_ptr<RenderPassMaskProgramAA>& program =
2696 if (!program)
2697 program =
2699 if (!program->initialized()) {
2701 program->Initialize(context_, is_using_bind_uniform_);
2703 return program.get();
2708 scoped_ptr<RenderPassColorMatrixProgram>& program =
2712 if (!program)
2713 program = make_scoped_ptr(
2715 if (!program->initialized()) {
2717 program->Initialize(context_, is_using_bind_uniform_);
2719 return program.get();
2724 scoped_ptr<RenderPassColorMatrixProgramAA>& program =
2728 if (!program)
2729 program = make_scoped_ptr(
2731 if (!program->initialized()) {
2734 program->Initialize(context_, is_using_bind_uniform_);
2736 return program.get();
2741 scoped_ptr<RenderPassMaskColorMatrixProgram>& program =
2745 if (!program)
2746 program = make_scoped_ptr(
2748 if (!program->initialized()) {
2751 program->Initialize(context_, is_using_bind_uniform_);
2753 return program.get();
2758 scoped_ptr<RenderPassMaskColorMatrixProgramAA>& program =
2762 if (!program)
2763 program = make_scoped_ptr(
2765 if (!program->initialized()) {
2768 program->Initialize(context_, is_using_bind_uniform_);
2770 return program.get();
2775 scoped_ptr<TileProgram>& program =
2778 DCHECK(program);
2779 if (!program->initialized()) {
2781 program->Initialize(context_, is_using_bind_uniform_);
2783 return program.get();
2788 scoped_ptr<TileProgramOpaque>& program =
2791 DCHECK(program);
2792 if (!program->initialized()) {
2794 program->Initialize(context_, is_using_bind_uniform_);
2796 return program.get();
2801 scoped_ptr<TileProgramAA>& program =
2804 if (!program)
2805 program = make_scoped_ptr(new TileProgramAA(context_, precision));
2806 if (!program->initialized()) {
2808 program->Initialize(context_, is_using_bind_uniform_);
2810 return program.get();
2815 scoped_ptr<TileProgramSwizzle>& program =
2818 if (!program)
2819 program = make_scoped_ptr(new TileProgramSwizzle(context_, precision));
2820 if (!program->initialized()) {
2822 program->Initialize(context_, is_using_bind_uniform_);
2824 return program.get();
2829 scoped_ptr<TileProgramSwizzleOpaque>& program =
2832 if (!program)
2833 program = make_scoped_ptr(
2835 if (!program->initialized()) {
2837 program->Initialize(context_, is_using_bind_uniform_);
2839 return program.get();
2844 scoped_ptr<TileProgramSwizzleAA>& program =
2847 if (!program)
2848 program = make_scoped_ptr(new TileProgramSwizzleAA(context_, precision));
2849 if (!program->initialized()) {
2851 program->Initialize(context_, is_using_bind_uniform_);
2853 return program.get();
2858 scoped_ptr<TextureProgram>& program =
2861 if (!program)
2862 program = make_scoped_ptr(new TextureProgram(context_, precision));
2863 if (!program->initialized()) {
2865 program->Initialize(context_, is_using_bind_uniform_);
2867 return program.get();
2872 scoped_ptr<NonPremultipliedTextureProgram>& program =
2876 if (!program) {
2877 program = make_scoped_ptr(
2880 if (!program->initialized()) {
2883 program->Initialize(context_, is_using_bind_uniform_);
2885 return program.get();
2890 scoped_ptr<TextureBackgroundProgram>& program =
2893 if (!program) {
2894 program = make_scoped_ptr(
2897 if (!program->initialized()) {
2899 program->Initialize(context_, is_using_bind_uniform_);
2901 return program.get();
2907 scoped_ptr<NonPremultipliedTextureBackgroundProgram>& program =
2911 if (!program) {
2912 program = make_scoped_ptr(
2915 if (!program->initialized()) {
2918 program->Initialize(context_, is_using_bind_uniform_);
2920 return program.get();
2925 scoped_ptr<TextureIOSurfaceProgram>& program =
2928 if (!program)
2929 program =
2931 if (!program->initialized()) {
2933 program->Initialize(context_, is_using_bind_uniform_);
2935 return program.get();
2940 scoped_ptr<VideoYUVProgram>& program =
2943 if (!program)
2944 program = make_scoped_ptr(new VideoYUVProgram(context_, precision));
2945 if (!program->initialized()) {
2947 program->Initialize(context_, is_using_bind_uniform_);
2949 return program.get();
2954 scoped_ptr<VideoYUVAProgram>& program =
2957 if (!program)
2958 program = make_scoped_ptr(new VideoYUVAProgram(context_, precision));
2959 if (!program->initialized()) {
2961 program->Initialize(context_, is_using_bind_uniform_);
2963 return program.get();
2970 scoped_ptr<VideoStreamTextureProgram>& program =
2973 if (!program)
2974 program =
2976 if (!program->initialized()) {
2978 program->Initialize(context_, is_using_bind_uniform_);
2980 return program.get();