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.
5 #include "mojo/examples/surfaces_app/surfaces_util.h"
7 #include "cc/quads/render_pass.h"
8 #include "cc/quads/shared_quad_state.h"
9 #include "ui/gfx/rect.h"
10 #include "ui/gfx/size.h"
11 #include "ui/gfx/transform.h"
16 using cc::SharedQuadState;
18 void CreateAndAppendSimpleSharedQuadState(cc::RenderPass* render_pass,
19 const gfx::Transform& transform,
20 const gfx::Size& size) {
21 const gfx::Size content_bounds = size;
22 const gfx::Rect visible_content_rect = gfx::Rect(size);
23 const gfx::Rect clip_rect = gfx::Rect(size);
24 bool is_clipped = false;
26 const SkXfermode::Mode blend_mode = SkXfermode::kSrcOver_Mode;
27 SharedQuadState* shared_state = render_pass->CreateAndAppendSharedQuadState();
28 shared_state->SetAll(transform,
39 } // namespace examples