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

Side by Side Diff: cc/ipc/render_pass_struct_traits.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Rebased to resolve conflict. Created 3 years, 4 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/ipc/render_pass_struct_traits.h ('k') | cc/ipc/struct_traits_unittest.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "cc/ipc/render_pass_struct_traits.h" 5 #include "cc/ipc/render_pass_struct_traits.h"
6 6
7 #include "base/numerics/safe_conversions.h" 7 #include "base/numerics/safe_conversions.h"
8 #include "cc/ipc/shared_quad_state_struct_traits.h" 8 #include "cc/ipc/shared_quad_state_struct_traits.h"
9 9
10 namespace mojo { 10 namespace mojo {
(...skipping 10 matching lines...) Expand all
21 !data.ReadFilters(&(*out)->filters) || 21 !data.ReadFilters(&(*out)->filters) ||
22 !data.ReadBackgroundFilters(&(*out)->background_filters) || 22 !data.ReadBackgroundFilters(&(*out)->background_filters) ||
23 !data.ReadColorSpace(&(*out)->color_space)) { 23 !data.ReadColorSpace(&(*out)->color_space)) {
24 return false; 24 return false;
25 } 25 }
26 (*out)->id = data.id(); 26 (*out)->id = data.id();
27 // RenderPass ids are never zero. 27 // RenderPass ids are never zero.
28 if (!(*out)->id) 28 if (!(*out)->id)
29 return false; 29 return false;
30 (*out)->has_transparent_background = data.has_transparent_background(); 30 (*out)->has_transparent_background = data.has_transparent_background();
31 (*out)->cache_render_pass = data.cache_render_pass();
32 (*out)->has_damage_from_contributing_content =
33 data.has_damage_from_contributing_content();
31 34
32 mojo::ArrayDataView<cc::mojom::DrawQuadDataView> quads; 35 mojo::ArrayDataView<cc::mojom::DrawQuadDataView> quads;
33 data.GetQuadListDataView(&quads); 36 data.GetQuadListDataView(&quads);
34 cc::SharedQuadState* last_sqs = nullptr; 37 cc::SharedQuadState* last_sqs = nullptr;
35 cc::DrawQuad* last_draw_quad = nullptr; 38 cc::DrawQuad* last_draw_quad = nullptr;
36 for (size_t i = 0; i < quads.size(); ++i) { 39 for (size_t i = 0; i < quads.size(); ++i) {
37 cc::mojom::DrawQuadDataView quad_data_view; 40 cc::mojom::DrawQuadDataView quad_data_view;
38 quads.GetDataView(i, &quad_data_view); 41 quads.GetDataView(i, &quad_data_view);
39 cc::mojom::DrawQuadStateDataView quad_state_data_view; 42 cc::mojom::DrawQuadStateDataView quad_state_data_view;
40 quad_data_view.GetDrawQuadStateDataView(&quad_state_data_view); 43 quad_data_view.GetDrawQuadStateDataView(&quad_state_data_view);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 84 }
82 last_surface_draw_quad->fallback_quad = surface_draw_quad; 85 last_surface_draw_quad->fallback_quad = surface_draw_quad;
83 } 86 }
84 } 87 }
85 last_draw_quad = quad; 88 last_draw_quad = quad;
86 } 89 }
87 return true; 90 return true;
88 } 91 }
89 92
90 } // namespace mojo 93 } // namespace mojo
OLDNEW
« no previous file with comments | « cc/ipc/render_pass_struct_traits.h ('k') | cc/ipc/struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698