blob: 0421a1eaaa998a3104023b479556fb2e9b38ec31 [file] [log] [blame]
James Robinson646469d2014-10-03 15:33:28 -07001// Copyright 2013 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#ifndef CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_
6#define CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_
7
8#include "base/memory/scoped_ptr.h"
James Robinson646469d2014-10-03 15:33:28 -07009#include "cc/quads/draw_quad.h"
James Robinson30d547e2014-10-23 18:20:06 -070010#include "ui/gfx/geometry/point.h"
11#include "ui/gfx/geometry/size.h"
James Robinson646469d2014-10-03 15:33:28 -070012
13namespace cc {
14
James Robinson41b80ab2015-04-03 16:10:47 -070015class ContentDrawQuadBase : public DrawQuad {
James Robinson646469d2014-10-03 15:33:28 -070016 public:
17 void SetNew(const SharedQuadState* shared_quad_state,
18 DrawQuad::Material material,
19 const gfx::Rect& rect,
20 const gfx::Rect& opaque_rect,
21 const gfx::Rect& visible_rect,
22 const gfx::RectF& tex_coord_rect,
23 const gfx::Size& texture_size,
Etienne Membrivesb1556b32014-12-16 13:56:09 +010024 bool swizzle_contents,
25 bool nearest_neighbor);
James Robinson646469d2014-10-03 15:33:28 -070026
27 void SetAll(const SharedQuadState* shared_quad_state,
28 DrawQuad::Material material,
29 const gfx::Rect& rect,
30 const gfx::Rect& opaque_rect,
31 const gfx::Rect& visible_rect,
32 bool needs_blending,
33 const gfx::RectF& tex_coord_rect,
34 const gfx::Size& texture_size,
Etienne Membrivesb1556b32014-12-16 13:56:09 +010035 bool swizzle_contents,
36 bool nearest_neighbor);
James Robinson646469d2014-10-03 15:33:28 -070037
38 gfx::RectF tex_coord_rect;
39 gfx::Size texture_size;
40 bool swizzle_contents;
Etienne Membrivesb1556b32014-12-16 13:56:09 +010041 bool nearest_neighbor;
James Robinson646469d2014-10-03 15:33:28 -070042
43 protected:
44 ContentDrawQuadBase();
James Robinsone1b30cf2014-10-21 12:25:40 -070045 ~ContentDrawQuadBase() override;
Etienne Membrives386015a2015-02-19 17:27:12 +010046 void ExtendValue(base::trace_event::TracedValue* value) const override;
James Robinson646469d2014-10-03 15:33:28 -070047};
48
49} // namespace cc
50
51#endif // CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_