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

Side by Side Diff: mojo/services/surfaces/public/cpp/surfaces_utils.cc

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
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 "surfaces/public/cpp/surfaces_utils.h" 5 #include "surfaces/public/cpp/surfaces_utils.h"
6 6
7 #include "geometry/public/interfaces/geometry.mojom.h" 7 #include "geometry/public/interfaces/geometry.mojom.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 10
(...skipping 13 matching lines...) Expand all
24 SharedQuadStatePtr sqs = SharedQuadState::New(); 24 SharedQuadStatePtr sqs = SharedQuadState::New();
25 sqs->content_to_target_transform = GetIdentityTransform(); 25 sqs->content_to_target_transform = GetIdentityTransform();
26 sqs->content_bounds = size.Clone(); 26 sqs->content_bounds = size.Clone();
27 Rect rect; 27 Rect rect;
28 rect.width = size.width; 28 rect.width = size.width;
29 rect.height = size.height; 29 rect.height = size.height;
30 sqs->visible_content_rect = rect.Clone(); 30 sqs->visible_content_rect = rect.Clone();
31 sqs->clip_rect = rect.Clone(); 31 sqs->clip_rect = rect.Clone();
32 sqs->is_clipped = false; 32 sqs->is_clipped = false;
33 sqs->opacity = 1.f; 33 sqs->opacity = 1.f;
34 sqs->blend_mode = mojo::SK_XFERMODE_kSrc_Mode; 34 sqs->blend_mode = mojo::SkXfermode::kSrc_Mode;
35 sqs->sorting_context_id = 0; 35 sqs->sorting_context_id = 0;
36 return sqs.Pass(); 36 return sqs.Pass();
37 } 37 }
38 38
39 PassPtr CreateDefaultPass(int id, const Rect& rect) { 39 PassPtr CreateDefaultPass(int id, const Rect& rect) {
40 PassPtr pass = Pass::New(); 40 PassPtr pass = Pass::New();
41 pass->id = id; 41 pass->id = id;
42 pass->output_rect = rect.Clone(); 42 pass->output_rect = rect.Clone();
43 pass->damage_rect = rect.Clone(); 43 pass->damage_rect = rect.Clone();
44 pass->transform_to_root_target = GetIdentityTransform(); 44 pass->transform_to_root_target = GetIdentityTransform();
45 pass->has_transparent_background = false; 45 pass->has_transparent_background = false;
46 return pass.Pass(); 46 return pass.Pass();
47 } 47 }
48 48
49 } // namespace mojo 49 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/files/public/cpp/tests/output_stream_file_unittest.cc ('k') | mojo/services/view_manager/public/cpp/lib/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698