blob: 990b2764f7c706dd271ef893e1ff28b66b2afcf8 [file] [log] [blame]
[email protected]0fb25002012-10-12 07:20:021// Copyright 2012 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.
[email protected]cd57cc5a2012-10-12 22:43:414
[email protected]89e82672013-03-18 07:50:565#ifndef CC_QUADS_TEXTURE_DRAW_QUAD_H_
6#define CC_QUADS_TEXTURE_DRAW_QUAD_H_
[email protected]cd57cc5a2012-10-12 22:43:417
[email protected]cd57cc5a2012-10-12 22:43:418#include "base/memory/scoped_ptr.h"
[email protected]681ccff2013-03-18 06:13:529#include "cc/base/cc_export.h"
[email protected]89e82672013-03-18 07:50:5610#include "cc/quads/draw_quad.h"
heejin.r.chungd28506ba2014-10-23 16:36:2011#include "ui/gfx/geometry/rect_f.h"
[email protected]cd57cc5a2012-10-12 22:43:4112
13namespace cc {
14
[email protected]52347c842012-11-02 21:06:2015class CC_EXPORT TextureDrawQuad : public DrawQuad {
[email protected]c22418b2012-11-20 23:06:2616 public:
[email protected]cb3203582014-07-16 07:51:5317 TextureDrawQuad();
[email protected]cd57cc5a2012-10-12 22:43:4118
[email protected]c22418b2012-11-20 23:06:2619 void SetNew(const SharedQuadState* shared_quad_state,
[email protected]0023fc72014-01-10 20:05:0620 const gfx::Rect& rect,
21 const gfx::Rect& opaque_rect,
[email protected]9bf06c72014-03-07 18:16:2422 const gfx::Rect& visible_rect,
[email protected]c22418b2012-11-20 23:06:2623 unsigned resource_id,
24 bool premultiplied_alpha,
[email protected]14bc5d682014-01-17 07:26:4725 const gfx::PointF& uv_top_left,
26 const gfx::PointF& uv_bottom_right,
[email protected]d18b4d62013-07-12 05:33:4927 SkColor background_color,
[email protected]4c91aec2012-12-15 20:17:1828 const float vertex_opacity[4],
jackhou10c9af42014-12-04 05:24:4429 bool flipped,
30 bool nearest_neighbor);
[email protected]cd57cc5a2012-10-12 22:43:4131
[email protected]c22418b2012-11-20 23:06:2632 void SetAll(const SharedQuadState* shared_quad_state,
[email protected]0023fc72014-01-10 20:05:0633 const gfx::Rect& rect,
34 const gfx::Rect& opaque_rect,
35 const gfx::Rect& visible_rect,
[email protected]c22418b2012-11-20 23:06:2636 bool needs_blending,
37 unsigned resource_id,
38 bool premultiplied_alpha,
[email protected]14bc5d682014-01-17 07:26:4739 const gfx::PointF& uv_top_left,
40 const gfx::PointF& uv_bottom_right,
[email protected]d18b4d62013-07-12 05:33:4941 SkColor background_color,
[email protected]4c91aec2012-12-15 20:17:1842 const float vertex_opacity[4],
jackhou10c9af42014-12-04 05:24:4443 bool flipped,
44 bool nearest_neighbor);
[email protected]cd57cc5a2012-10-12 22:43:4145
[email protected]c22418b2012-11-20 23:06:2646 unsigned resource_id;
47 bool premultiplied_alpha;
[email protected]1fd555b2013-01-18 00:13:2148 gfx::PointF uv_top_left;
49 gfx::PointF uv_bottom_right;
[email protected]d18b4d62013-07-12 05:33:4950 SkColor background_color;
[email protected]4c91aec2012-12-15 20:17:1851 float vertex_opacity[4];
[email protected]c22418b2012-11-20 23:06:2652 bool flipped;
jackhou10c9af42014-12-04 05:24:4453 bool nearest_neighbor;
[email protected]c22418b2012-11-20 23:06:2654
dcheng716bedf2014-10-21 09:51:0855 void IterateResources(const ResourceIteratorCallback& callback) override;
[email protected]05469632013-01-16 03:41:0056
[email protected]c22418b2012-11-20 23:06:2657 static const TextureDrawQuad* MaterialCast(const DrawQuad*);
[email protected]cd48d682012-12-13 02:42:1958
[email protected]c22418b2012-11-20 23:06:2659 private:
dcheng716bedf2014-10-21 09:51:0860 void ExtendValue(base::debug::TracedValue* value) const override;
[email protected]cd57cc5a2012-10-12 22:43:4161};
62
[email protected]adb08542013-03-26 18:06:1063} // namespace cc
[email protected]cd57cc5a2012-10-12 22:43:4164
[email protected]89e82672013-03-18 07:50:5665#endif // CC_QUADS_TEXTURE_DRAW_QUAD_H_