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

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

Issue 534843002: Convert view manager to surfaces with uploading shim in client lib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove overzealous shutdown check in cc/surfaces, add NON_EXPORTED_BASE for windows build, saturate… Created 6 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "mojo/services/public/cpp/surfaces/surfaces_utils.h"
6
7 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
8 #include "ui/gfx/geometry/rect.h"
9 #include "ui/gfx/geometry/size.h"
10 #include "ui/gfx/transform.h"
11
12 namespace mojo {
13
14 SharedQuadStatePtr CreateDefaultSQS(const gfx::Size& size) {
15 SharedQuadStatePtr sqs = SharedQuadState::New();
16 sqs->content_to_target_transform = Transform::From(gfx::Transform());
17 sqs->content_bounds = Size::From(size);
18 sqs->visible_content_rect = Rect::From(gfx::Rect(size));
19 sqs->clip_rect = Rect::From(gfx::Rect(size));
20 sqs->is_clipped = false;
21 sqs->opacity = 1.f;
22 sqs->blend_mode = mojo::SK_XFERMODE_kSrc_Mode;
23 sqs->sorting_context_id = 0;
24 return sqs.Pass();
25 }
26
27 PassPtr CreateDefaultPass(int id, const gfx::Rect& rect) {
28 PassPtr pass = Pass::New();
29 pass->id = id;
30 pass->output_rect = Rect::From(rect);
31 pass->damage_rect = Rect::From(rect);
32 pass->transform_to_root_target = Transform::From(gfx::Transform());
33 pass->has_transparent_background = false;
34 return pass.Pass();
35 }
36
37 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/surfaces/DEPS ('k') | mojo/services/public/cpp/surfaces/surfaces_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698