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

Side by Side Diff: cc/output/shader.h

Issue 12157002: Adding YUVA support for enabling Alpha Playback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and calming down the try bots Created 7 years, 6 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #ifndef CC_OUTPUT_SHADER_H_ 5 #ifndef CC_OUTPUT_SHADER_H_
6 #define CC_OUTPUT_SHADER_H_ 6 #define CC_OUTPUT_SHADER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 int y_texture_location_; 568 int y_texture_location_;
569 int u_texture_location_; 569 int u_texture_location_;
570 int v_texture_location_; 570 int v_texture_location_;
571 int alpha_location_; 571 int alpha_location_;
572 int yuv_matrix_location_; 572 int yuv_matrix_location_;
573 int yuv_adj_location_; 573 int yuv_adj_location_;
574 574
575 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo); 575 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo);
576 }; 576 };
577 577
578
579 class FragmentShaderYUVAVideo {
580 public:
581 FragmentShaderYUVAVideo();
582 std::string GetShaderString(TexCoordPrecision precision) const;
583
584 void Init(WebKit::WebGraphicsContext3D* context,
585 unsigned program,
586 bool using_bind_uniform,
587 int* base_uniform_index);
588
589 int y_texture_location() const { return y_texture_location_; }
590 int u_texture_location() const { return u_texture_location_; }
591 int v_texture_location() const { return v_texture_location_; }
592 int a_texture_location() const { return a_texture_location_; }
593 int alpha_location() const { return alpha_location_; }
594 int yuv_matrix_location() const { return yuv_matrix_location_; }
595 int yuv_adj_location() const { return yuv_adj_location_; }
596
597 private:
598 int y_texture_location_;
599 int u_texture_location_;
600 int v_texture_location_;
601 int a_texture_location_;
602 int alpha_location_;
603 int yuv_matrix_location_;
604 int yuv_adj_location_;
605
606 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVAVideo);
607 };
608
578 class FragmentShaderColor { 609 class FragmentShaderColor {
579 public: 610 public:
580 FragmentShaderColor(); 611 FragmentShaderColor();
581 std::string GetShaderString(TexCoordPrecision precision) const; 612 std::string GetShaderString(TexCoordPrecision precision) const;
582 613
583 void Init(WebKit::WebGraphicsContext3D* context, 614 void Init(WebKit::WebGraphicsContext3D* context,
584 unsigned program, 615 unsigned program,
585 bool using_bind_uniform, 616 bool using_bind_uniform,
586 int* base_uniform_index); 617 int* base_uniform_index);
587 int edge_location() const { return -1; } 618 int edge_location() const { return -1; }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 int tex_transform_location_; 662 int tex_transform_location_;
632 int frequency_location_; 663 int frequency_location_;
633 int color_location_; 664 int color_location_;
634 665
635 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard); 666 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard);
636 }; 667 };
637 668
638 } // namespace cc 669 } // namespace cc
639 670
640 #endif // CC_OUTPUT_SHADER_H_ 671 #endif // CC_OUTPUT_SHADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698