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

Side by Side Diff: cc/geometry_binding.h

Issue 11275113: Remove most remaining references to IntRect and FloatRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compositor bindings 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/float_quad_unittest.cc ('k') | cc/geometry_binding.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 GeometryBinding_h 5 #ifndef GeometryBinding_h
6 #define GeometryBinding_h 6 #define GeometryBinding_h
7 7
8 #include "FloatRect.h" 8 namespace gfx {
9 class RectF;
10 }
9 11
10 namespace WebKit { 12 namespace WebKit {
11 class WebGraphicsContext3D; 13 class WebGraphicsContext3D;
12 } 14 }
13 15
14 namespace cc { 16 namespace cc {
15 17
16 class GeometryBinding { 18 class GeometryBinding {
17 public: 19 public:
18 GeometryBinding(WebKit::WebGraphicsContext3D*, const FloatRect& quadVertexRe ct); 20 GeometryBinding(WebKit::WebGraphicsContext3D*, const gfx::RectF& quadVertexR ect);
19 ~GeometryBinding(); 21 ~GeometryBinding();
20 22
21 bool initialized() const { return m_initialized; } 23 bool initialized() const { return m_initialized; }
22 24
23 WebKit::WebGraphicsContext3D* context() const { return m_context; } 25 WebKit::WebGraphicsContext3D* context() const { return m_context; }
24 unsigned quadVerticesVbo() const { return m_quadVerticesVbo; } 26 unsigned quadVerticesVbo() const { return m_quadVerticesVbo; }
25 unsigned quadElementsVbo() const { return m_quadElementsVbo; } 27 unsigned quadElementsVbo() const { return m_quadElementsVbo; }
26 28
27 void prepareForDraw(); 29 void prepareForDraw();
28 30
29 // All layer shaders share the same attribute locations for the vertex 31 // All layer shaders share the same attribute locations for the vertex
30 // positions and texture coordinates. This allows switching shaders without 32 // positions and texture coordinates. This allows switching shaders without
31 // rebinding attribute arrays. 33 // rebinding attribute arrays.
32 static int positionAttribLocation() { return 0; } 34 static int positionAttribLocation() { return 0; }
33 static int texCoordAttribLocation() { return 1; } 35 static int texCoordAttribLocation() { return 1; }
34 36
35 private: 37 private:
36 WebKit::WebGraphicsContext3D* m_context; 38 WebKit::WebGraphicsContext3D* m_context;
37 unsigned m_quadVerticesVbo; 39 unsigned m_quadVerticesVbo;
38 unsigned m_quadElementsVbo; 40 unsigned m_quadElementsVbo;
39 bool m_initialized; 41 bool m_initialized;
40 }; 42 };
41 43
42 } // namespace cc 44 } // namespace cc
43 45
44 #endif 46 #endif
OLDNEW
« no previous file with comments | « cc/float_quad_unittest.cc ('k') | cc/geometry_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698