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

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

Issue 2847553002: cc: Replace some instances of unordered_map with base::flat_map. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/paint/discardable_image_map.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_H_ 5 #ifndef CC_OUTPUT_GL_RENDERER_H_
6 #define CC_OUTPUT_GL_RENDERER_H_ 6 #define CC_OUTPUT_GL_RENDERER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <unordered_map>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/cancelable_callback.h" 12 #include "base/cancelable_callback.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "cc/cc_export.h" 14 #include "cc/cc_export.h"
14 #include "cc/output/color_lut_cache.h" 15 #include "cc/output/color_lut_cache.h"
15 #include "cc/output/context_cache_controller.h" 16 #include "cc/output/context_cache_controller.h"
16 #include "cc/output/direct_renderer.h" 17 #include "cc/output/direct_renderer.h"
17 #include "cc/output/gl_renderer_draw_cache.h" 18 #include "cc/output/gl_renderer_draw_cache.h"
18 #include "cc/output/program_binding.h" 19 #include "cc/output/program_binding.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 unsigned offscreen_framebuffer_id_ = 0u; 293 unsigned offscreen_framebuffer_id_ = 0u;
293 294
294 std::unique_ptr<StaticGeometryBinding> shared_geometry_; 295 std::unique_ptr<StaticGeometryBinding> shared_geometry_;
295 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_; 296 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_;
296 gfx::QuadF shared_geometry_quad_; 297 gfx::QuadF shared_geometry_quad_;
297 298
298 // This will return nullptr if the requested program has not yet been 299 // This will return nullptr if the requested program has not yet been
299 // initialized. 300 // initialized.
300 const Program* GetProgramIfInitialized(const ProgramKey& key) const; 301 const Program* GetProgramIfInitialized(const ProgramKey& key) const;
301 302
302 std::unordered_map<ProgramKey, std::unique_ptr<Program>, ProgramKeyHash> 303 std::unordered_map<ProgramKey, std::unique_ptr<Program>, ProgramKeyHash>
vmpstr 2017/04/26 22:12:00 The ProgramKey here is pretty big. It does have an
danakj 2017/04/26 22:16:31 2017/04/26 22:12:00, vmpstr wrote:
303 program_cache_; 304 program_cache_;
304 305
305 const gfx::ColorTransform* GetColorTransform(const gfx::ColorSpace& src, 306 const gfx::ColorTransform* GetColorTransform(const gfx::ColorSpace& src,
306 const gfx::ColorSpace& dst); 307 const gfx::ColorSpace& dst);
307 std::map<gfx::ColorSpace, 308 std::map<gfx::ColorSpace,
308 std::map<gfx::ColorSpace, std::unique_ptr<gfx::ColorTransform>>> 309 std::map<gfx::ColorSpace, std::unique_ptr<gfx::ColorTransform>>>
309 color_transform_cache_; 310 color_transform_cache_;
310 311
311 gpu::gles2::GLES2Interface* gl_; 312 gpu::gles2::GLES2Interface* gl_;
312 gpu::ContextSupport* context_support_; 313 gpu::ContextSupport* context_support_;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 gfx::Size offscreen_stencil_renderbuffer_size_; 367 gfx::Size offscreen_stencil_renderbuffer_size_;
367 368
368 base::WeakPtrFactory<GLRenderer> weak_ptr_factory_; 369 base::WeakPtrFactory<GLRenderer> weak_ptr_factory_;
369 370
370 DISALLOW_COPY_AND_ASSIGN(GLRenderer); 371 DISALLOW_COPY_AND_ASSIGN(GLRenderer);
371 }; 372 };
372 373
373 } // namespace cc 374 } // namespace cc
374 375
375 #endif // CC_OUTPUT_GL_RENDERER_H_ 376 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/paint/discardable_image_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698