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

Side by Side Diff: compositor/texture_data.h

Issue 6793005: Add the xrender backend to the window manager. (Closed) Base URL: ssh://gitrw.chromium.org:9222/window_manager.git@master
Patch Set: Created 9 years, 8 months 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
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 WINDOW_MANAGER_COMPOSITOR_TEXTURE_DATA_H_ 5 #ifndef WINDOW_MANAGER_COMPOSITOR_TEXTURE_DATA_H_
6 #define WINDOW_MANAGER_COMPOSITOR_TEXTURE_DATA_H_ 6 #define WINDOW_MANAGER_COMPOSITOR_TEXTURE_DATA_H_
7 7
8 namespace window_manager { 8 namespace window_manager {
9 9
10 class TextureData { 10 class TextureData {
11 public: 11 public:
12 virtual ~TextureData() {} 12 virtual ~TextureData() {}
13 GLuint texture() const { return texture_; } 13 unsigned texture() const { return texture_; }
Daniel Erat 2011/04/02 14:54:36 "unsigned" makes me nervous. please use uint32_t
marcheu 2011/04/04 19:55:58 GLuint is actually defined as an unsigned, but I s
14 14
15 bool has_alpha() const { return has_alpha_; } 15 bool has_alpha() const { return has_alpha_; }
16 void set_has_alpha(bool has_alpha) { has_alpha_ = has_alpha; } 16 void set_has_alpha(bool has_alpha) { has_alpha_ = has_alpha; }
17 virtual void Refresh() {} 17 virtual void Refresh() {}
18 18
19 protected: 19 protected:
20 // TextureData is not allowed to be instantiated. 20 // TextureData is not allowed to be instantiated.
21 TextureData() : texture_(0), has_alpha_(true) {} 21 TextureData() : texture_(0), has_alpha_(true) {}
22 void set_texture(GLuint texture) { texture_ = texture; } 22 void set_texture(unsigned texture) { texture_ = texture; }
23 const GLuint* texture_ptr() { return &texture_; } 23 const unsigned* texture_ptr() { return &texture_; }
24 24
25 private: 25 private:
26 GLuint texture_; 26 unsigned texture_;
27 bool has_alpha_; 27 bool has_alpha_;
28 DISALLOW_COPY_AND_ASSIGN(TextureData); 28 DISALLOW_COPY_AND_ASSIGN(TextureData);
29 }; 29 };
30 30
31 } // namespace window_manager 31 } // namespace window_manager
32 32
33 #endif // WINDOW_MANAGER_COMPOSITOR_TEXTURE_DATA_H_ 33 #endif // WINDOW_MANAGER_COMPOSITOR_TEXTURE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698