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

Unified Diff: cc/output/gl_renderer_draw_cache.h

Issue 2687653002: cc: Remove more uniform location caching (Closed)
Patch Set: Review feedback 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 | « cc/output/gl_renderer.cc ('k') | cc/output/gl_renderer_draw_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer_draw_cache.h
diff --git a/cc/output/gl_renderer_draw_cache.h b/cc/output/gl_renderer_draw_cache.h
index e02b73b4e381c10bb02decbd40ac0ee00ebce184..493ae4ca2a25dee3569a7c668e8920c60446a0f9 100644
--- a/cc/output/gl_renderer_draw_cache.h
+++ b/cc/output/gl_renderer_draw_cache.h
@@ -12,6 +12,8 @@
namespace cc {
+class Program;
+
// Collects 4 floats at a time for easy upload to GL.
struct Float4 {
float data[4];
@@ -30,18 +32,11 @@ struct TexturedQuadDrawCache {
~TexturedQuadDrawCache();
// Values tracked to determine if textured quads may be coalesced.
- int program_id;
- int resource_id;
- bool needs_blending;
- bool nearest_neighbor;
- SkColor background_color;
-
- // Information about the program binding that is required to draw.
- int uv_xform_location;
- int background_color_location;
- int vertex_opacity_location;
- int matrix_location;
- int sampler_location;
+ const Program* program = nullptr;
+ int resource_id = -1;
+ bool needs_blending = false;
+ bool nearest_neighbor = false;
+ SkColor background_color = 0;
// A cache for the coalesced quad data.
std::vector<Float4> uv_xform_data;
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/gl_renderer_draw_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698