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

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

Issue 558083002: [cc] Add nearest neighbor filtering for TextureLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to WebExternalTextureLayer::setNearestNeighbor. Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 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_GL_RENDERER_DRAW_CACHE_H_ 5 #ifndef CC_OUTPUT_GL_RENDERER_DRAW_CACHE_H_
6 #define CC_OUTPUT_GL_RENDERER_DRAW_CACHE_H_ 6 #define CC_OUTPUT_GL_RENDERER_DRAW_CACHE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 15 matching lines...) Expand all
26 // data to tell if two back to back draws only differ in their transform. Quads 26 // data to tell if two back to back draws only differ in their transform. Quads
27 // that only differ by transform may be coalesced into a single draw call. 27 // that only differ by transform may be coalesced into a single draw call.
28 struct TexturedQuadDrawCache { 28 struct TexturedQuadDrawCache {
29 TexturedQuadDrawCache(); 29 TexturedQuadDrawCache();
30 ~TexturedQuadDrawCache(); 30 ~TexturedQuadDrawCache();
31 31
32 // Values tracked to determine if textured quads may be coalesced. 32 // Values tracked to determine if textured quads may be coalesced.
33 int program_id; 33 int program_id;
34 int resource_id; 34 int resource_id;
35 bool needs_blending; 35 bool needs_blending;
36 bool nearest_neighbor;
danakj 2014/11/17 17:39:41 please init this variable in the constructor
jackhou1 2014/11/17 22:46:35 Done.
36 SkColor background_color; 37 SkColor background_color;
37 38
38 // Information about the program binding that is required to draw. 39 // Information about the program binding that is required to draw.
39 int uv_xform_location; 40 int uv_xform_location;
40 int background_color_location; 41 int background_color_location;
41 int vertex_opacity_location; 42 int vertex_opacity_location;
42 int matrix_location; 43 int matrix_location;
43 int sampler_location; 44 int sampler_location;
44 45
45 // A cache for the coalesced quad data. 46 // A cache for the coalesced quad data.
46 std::vector<Float4> uv_xform_data; 47 std::vector<Float4> uv_xform_data;
47 std::vector<float> vertex_opacity_data; 48 std::vector<float> vertex_opacity_data;
48 std::vector<Float16> matrix_data; 49 std::vector<Float16> matrix_data;
49 50
50 private: 51 private:
51 DISALLOW_COPY_AND_ASSIGN(TexturedQuadDrawCache); 52 DISALLOW_COPY_AND_ASSIGN(TexturedQuadDrawCache);
52 }; 53 };
53 54
54 } // namespace cc 55 } // namespace cc
55 56
56 #endif // CC_OUTPUT_GL_RENDERER_DRAW_CACHE_H_ 57 #endif // CC_OUTPUT_GL_RENDERER_DRAW_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698