blob: 44e74d2bab3d5005fb7760e1b6408efc9a636881 [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
5#ifndef CCTextureDrawQuad_h
6#define CCTextureDrawQuad_h
7
[email protected]cd57cc5a2012-10-12 22:43:418#include "base/memory/scoped_ptr.h"
[email protected]52347c842012-11-02 21:06:209#include "cc/cc_export.h"
[email protected]aa0a9d32012-10-24 01:58:1010#include "cc/draw_quad.h"
[email protected]1fea8142012-10-20 04:12:4111#include "ui/gfx/rect_f.h"
[email protected]cd57cc5a2012-10-12 22:43:4112
13namespace cc {
14
15#pragma pack(push, 4)
16
[email protected]52347c842012-11-02 21:06:2017class CC_EXPORT TextureDrawQuad : public DrawQuad {
[email protected]cd57cc5a2012-10-12 22:43:4118public:
[email protected]96baf3e2012-10-22 23:09:5519 static scoped_ptr<TextureDrawQuad> create(const SharedQuadState*, const gfx::Rect&, unsigned resourceId, bool premultipliedAlpha, const gfx::RectF& uvRect, bool flipped);
[email protected]1fea8142012-10-20 04:12:4120 gfx::RectF uvRect() const { return m_uvRect; }
[email protected]cd57cc5a2012-10-12 22:43:4121
22 unsigned resourceId() const { return m_resourceId; }
23 bool premultipliedAlpha() const { return m_premultipliedAlpha; }
24 bool flipped() const { return m_flipped; }
25
26 void setNeedsBlending();
27
[email protected]96baf3e2012-10-22 23:09:5528 static const TextureDrawQuad* materialCast(const DrawQuad*);
[email protected]cd57cc5a2012-10-12 22:43:4129private:
[email protected]96baf3e2012-10-22 23:09:5530 TextureDrawQuad(const SharedQuadState*, const gfx::Rect&, unsigned resourceId, bool premultipliedAlpha, const gfx::RectF& uvRect, bool flipped);
[email protected]cd57cc5a2012-10-12 22:43:4131
32 unsigned m_resourceId;
33 bool m_premultipliedAlpha;
[email protected]1fea8142012-10-20 04:12:4134 gfx::RectF m_uvRect;
[email protected]cd57cc5a2012-10-12 22:43:4135 bool m_flipped;
36};
37
38#pragma pack(pop)
39
40}
41
42#endif