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

Side by Side Diff: cc/tile_draw_quad.h

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScaleAsVector Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/thread_proxy.cc ('k') | cc/tile_draw_quad.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CCTileDrawQuad_h 5 #ifndef CCTileDrawQuad_h
6 #define CCTileDrawQuad_h 6 #define CCTileDrawQuad_h
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/draw_quad.h" 9 #include "cc/draw_quad.h"
10 #include "third_party/khronos/GLES2/gl2.h" 10 #include "third_party/khronos/GLES2/gl2.h"
11 #include "ui/gfx/point.h" 11 #include "ui/gfx/point.h"
12 #include "ui/gfx/size.h" 12 #include "ui/gfx/size.h"
13 13
14 namespace cc { 14 namespace cc {
15 15
16 #pragma pack(push, 4) 16 #pragma pack(push, 4)
17 17
18 class TileDrawQuad : public DrawQuad { 18 class TileDrawQuad : public DrawQuad {
19 public: 19 public:
20 static scoped_ptr<TileDrawQuad> create(const SharedQuadState*, const gfx::Re ct& quadRect, const gfx::Rect& opaqueRect, unsigned resourceId, const gfx::Point & textureOffset, const gfx::Size& textureSize, GLint textureFilter, bool swizzle Contents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA); 20 static scoped_ptr<TileDrawQuad> create(const SharedQuadState*, const gfx::Re ct& quadRect, const gfx::Rect& opaqueRect, unsigned resourceId, const gfx::Vecto r2d& textureOffset, const gfx::Size& textureSize, GLint textureFilter, bool swiz zleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeA A);
21 21
22 unsigned resourceId() const { return m_resourceId; } 22 unsigned resourceId() const { return m_resourceId; }
23 gfx::Point textureOffset() const { return m_textureOffset; } 23 gfx::Vector2d textureOffset() const { return m_textureOffset; }
24 gfx::Size textureSize() const { return m_textureSize; } 24 gfx::Size textureSize() const { return m_textureSize; }
25 GLint textureFilter() const { return m_textureFilter; } 25 GLint textureFilter() const { return m_textureFilter; }
26 bool swizzleContents() const { return m_swizzleContents; } 26 bool swizzleContents() const { return m_swizzleContents; }
27 27
28 bool leftEdgeAA() const { return m_leftEdgeAA; } 28 bool leftEdgeAA() const { return m_leftEdgeAA; }
29 bool topEdgeAA() const { return m_topEdgeAA; } 29 bool topEdgeAA() const { return m_topEdgeAA; }
30 bool rightEdgeAA() const { return m_rightEdgeAA; } 30 bool rightEdgeAA() const { return m_rightEdgeAA; }
31 bool bottomEdgeAA() const { return m_bottomEdgeAA; } 31 bool bottomEdgeAA() const { return m_bottomEdgeAA; }
32 32
33 bool isAntialiased() const { return leftEdgeAA() || topEdgeAA() || rightEdge AA() || bottomEdgeAA(); } 33 bool isAntialiased() const { return leftEdgeAA() || topEdgeAA() || rightEdge AA() || bottomEdgeAA(); }
34 34
35 static const TileDrawQuad* materialCast(const DrawQuad*); 35 static const TileDrawQuad* materialCast(const DrawQuad*);
36 private: 36 private:
37 TileDrawQuad(const SharedQuadState*, const gfx::Rect& quadRect, const gfx::R ect& opaqueRect, unsigned resourceId, const gfx::Point& textureOffset, const gfx ::Size& textureSize, GLint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA); 37 TileDrawQuad(const SharedQuadState*, const gfx::Rect& quadRect, const gfx::R ect& opaqueRect, unsigned resourceId, const gfx::Vector2d& textureOffset, const gfx::Size& textureSize, GLint textureFilter, bool swizzleContents, bool leftEdge AA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA);
38 38
39 unsigned m_resourceId; 39 unsigned m_resourceId;
40 gfx::Point m_textureOffset; 40 gfx::Vector2d m_textureOffset;
41 gfx::Size m_textureSize; 41 gfx::Size m_textureSize;
42 GLint m_textureFilter; 42 GLint m_textureFilter;
43 bool m_swizzleContents; 43 bool m_swizzleContents;
44 bool m_leftEdgeAA; 44 bool m_leftEdgeAA;
45 bool m_topEdgeAA; 45 bool m_topEdgeAA;
46 bool m_rightEdgeAA; 46 bool m_rightEdgeAA;
47 bool m_bottomEdgeAA; 47 bool m_bottomEdgeAA;
48 }; 48 };
49 49
50 #pragma pack(pop) 50 #pragma pack(pop)
51 51
52 } 52 }
53 53
54 #endif 54 #endif
OLDNEW
« no previous file with comments | « cc/thread_proxy.cc ('k') | cc/tile_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698