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

Side by Side Diff: cc/gl_renderer_draw_cache.h

Issue 12912006: Part 4 of cc/ directory shuffles: output (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
(Empty)
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_GL_RENDERER_DRAW_CACHE_H_
6 #define CC_GL_RENDERER_DRAW_CACHE_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11
12 namespace cc {
13
14 // Collects 4 floats at a time for easy upload to GL.
15 struct Float4 { float data[4]; };
16
17 // Collects 16 floats at a time for easy upload to GL.
18 struct Float16 { float data[16]; };
19
20 // A cache for storing textured quads to be drawn. Stores the minimum required
21 // data to tell if two back to back draws only differ in their transform. Quads
22 // that only differ by transform may be coalesced into a single draw call.
23 struct TexturedQuadDrawCache {
24 TexturedQuadDrawCache();
25 ~TexturedQuadDrawCache();
26
27 // Values tracked to determine if textured quads may be coalesced.
28 int program_id;
29 int resource_id;
30 bool use_premultiplied_alpha;
31 bool needs_blending;
32
33 // Information about the program binding that is required to draw.
34 int uv_xform_location;
35 int vertex_opacity_location;
36 int matrix_location;
37 int sampler_location;
38
39 // A cache for the coalesced quad data.
40 std::vector<Float4> uv_xform_data;
41 std::vector<float> vertex_opacity_data;
42 std::vector<Float16> matrix_data;
43
44 DISALLOW_COPY_AND_ASSIGN(TexturedQuadDrawCache);
45 };
46
47 } // namespace cc
48
49 #endif // CC_GL_RENDERER_DRAW_CACHE_H_
OLDNEW
« no previous file with comments | « cc/gl_renderer.cc ('k') | cc/gl_renderer_draw_cache.cc » ('j') | content/common/view_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698