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

Unified Diff: cc/output/gl_renderer.h

Issue 2677893003: cc: Add color conversion support to all DrawQuad types (Closed)
Patch Set: Update w/2681223002 Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.h
diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h
index 529d2576683e79cc76ab46a8f1f260f56c5fb1b4..ea73b6f881e7d7958bedf7afcb51bf3141c0340f 100644
--- a/cc/output/gl_renderer.h
+++ b/cc/output/gl_renderer.h
@@ -215,7 +215,18 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
void DrawQuadGeometry(const gfx::Transform& projection_matrix,
const gfx::Transform& draw_transform,
const gfx::RectF& quad_rect);
- void SetUseProgram(const Program* program);
+
+ // If |dst_color_space| is invalid, then no color conversion (apart from
+ // YUV to RGB conversion) is performed. This explicit argument is available
+ // so that video color conversion can be enabled separately from general color
+ // conversion.
+ // TODO(ccameron): Remove the version with an explicit |dst_color_space|,
+ // since that will always be the device color space.
+ void SetUseProgram(const ProgramKey& program_key,
+ const gfx::ColorSpace& src_color_space,
+ const gfx::ColorSpace& dst_color_space);
+ void SetUseProgram(const ProgramKey& program_key,
+ const gfx::ColorSpace& src_color_space);
bool MakeContextCurrent();
@@ -280,10 +291,6 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
std::unique_ptr<DynamicGeometryBinding> clipped_geometry_;
gfx::QuadF shared_geometry_quad_;
- // If the requested program has not yet been initialized, this will initialize
- // the program before returning it.
- const Program* GetProgram(const ProgramKey& key);
-
// This will return nullptr if the requested program has not yet been
// initialized.
const Program* GetProgramIfInitialized(const ProgramKey& key) const;
@@ -302,7 +309,7 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
bool is_scissor_enabled_ = false;
bool stencil_shadow_ = false;
bool blend_shadow_ = false;
- const Program* program_shadow_ = nullptr;
+ const Program* current_program_ = nullptr;
enne (OOO) 2017/02/10 22:40:42 I considered suggesting this rename earlier...so t
TexturedQuadDrawCache draw_cache_;
int highp_threshold_min_ = 0;
int highp_threshold_cache_ = 0;
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698