OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/converters/surfaces/surfaces_utils.h" | 5 #include "mojo/converters/surfaces/surfaces_utils.h" |
6 | 6 |
7 #include "mojo/converters/geometry/geometry_type_converters.h" | 7 #include "mojo/converters/geometry/geometry_type_converters.h" |
8 #include "mojo/converters/transform/transform_type_converters.h" | 8 #include "mojo/converters/transform/transform_type_converters.h" |
9 #include "ui/gfx/geometry/rect.h" | 9 #include "ui/gfx/geometry/rect.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 SharedQuadStatePtr CreateDefaultSQS(const gfx::Size& size) { | 21 SharedQuadStatePtr CreateDefaultSQS(const gfx::Size& size) { |
22 SharedQuadStatePtr sqs = SharedQuadState::New(); | 22 SharedQuadStatePtr sqs = SharedQuadState::New(); |
23 sqs->quad_to_target_transform = Transform::From(gfx::Transform()); | 23 sqs->quad_to_target_transform = Transform::From(gfx::Transform()); |
24 sqs->quad_layer_bounds = Size::From(size); | 24 sqs->quad_layer_bounds = Size::From(size); |
25 sqs->visible_quad_layer_rect = Rect::From(gfx::Rect(size)); | 25 sqs->visible_quad_layer_rect = Rect::From(gfx::Rect(size)); |
26 sqs->clip_rect = Rect::From(gfx::Rect(size)); | 26 sqs->clip_rect = Rect::From(gfx::Rect(size)); |
27 sqs->is_clipped = false; | 27 sqs->is_clipped = false; |
28 sqs->opacity = 1.f; | 28 sqs->opacity = 1.f; |
29 sqs->blend_mode = mus::mojom::SK_XFERMODE_kSrc_Mode; | 29 sqs->blend_mode = mus::mojom::SK_XFERMODE_kSrc_Mode; |
30 sqs->sorting_context_id = 0; | 30 sqs->sorting_context_id = 0; |
31 return sqs.Pass(); | 31 return sqs; |
32 } | 32 } |
33 | 33 |
34 PassPtr CreateDefaultPass(int id, const gfx::Rect& rect) { | 34 PassPtr CreateDefaultPass(int id, const gfx::Rect& rect) { |
35 PassPtr pass = Pass::New(); | 35 PassPtr pass = Pass::New(); |
36 RenderPassId render_pass_id; | 36 RenderPassId render_pass_id; |
37 render_pass_id.layer_id = 1; | 37 render_pass_id.layer_id = 1; |
38 render_pass_id.index = id; | 38 render_pass_id.index = id; |
39 pass->id = render_pass_id.Clone(); | 39 pass->id = render_pass_id.Clone(); |
40 pass->output_rect = Rect::From(rect); | 40 pass->output_rect = Rect::From(rect); |
41 pass->damage_rect = Rect::From(rect); | 41 pass->damage_rect = Rect::From(rect); |
42 pass->transform_to_root_target = Transform::From(gfx::Transform()); | 42 pass->transform_to_root_target = Transform::From(gfx::Transform()); |
43 pass->has_transparent_background = false; | 43 pass->has_transparent_background = false; |
44 return pass.Pass(); | 44 return pass; |
45 } | 45 } |
46 | 46 |
47 } // namespace mojo | 47 } // namespace mojo |
OLD | NEW |