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

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: Address fourth round of comments. 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
« no previous file with comments | « compositor/real_compositor.cc ('k') | compositor/xrender/xrender_visitor.h » ('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 (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 #include <stdint.h>
9
8 namespace window_manager { 10 namespace window_manager {
9 11
10 class TextureData { 12 class TextureData {
11 public: 13 public:
12 virtual ~TextureData() {} 14 virtual ~TextureData() {}
13 GLuint texture() const { return texture_; } 15 uint32_t texture() const { return texture_; }
14 16
15 bool has_alpha() const { return has_alpha_; } 17 bool has_alpha() const { return has_alpha_; }
16 void set_has_alpha(bool has_alpha) { has_alpha_ = has_alpha; } 18 void set_has_alpha(bool has_alpha) { has_alpha_ = has_alpha; }
17 virtual void Refresh() {} 19 virtual void Refresh() {}
18 20
19 protected: 21 protected:
20 // TextureData is not allowed to be instantiated. 22 // TextureData is not allowed to be instantiated.
21 TextureData() : texture_(0), has_alpha_(true) {} 23 TextureData() : texture_(0), has_alpha_(true) {}
22 void set_texture(GLuint texture) { texture_ = texture; } 24 void set_texture(uint32_t texture) { texture_ = texture; }
23 const GLuint* texture_ptr() { return &texture_; } 25 const uint32_t* texture_ptr() { return &texture_; }
24 26
25 private: 27 private:
26 GLuint texture_; 28 uint32_t texture_;
27 bool has_alpha_; 29 bool has_alpha_;
28 DISALLOW_COPY_AND_ASSIGN(TextureData); 30 DISALLOW_COPY_AND_ASSIGN(TextureData);
29 }; 31 };
30 32
31 } // namespace window_manager 33 } // namespace window_manager
32 34
33 #endif // WINDOW_MANAGER_COMPOSITOR_TEXTURE_DATA_H_ 35 #endif // WINDOW_MANAGER_COMPOSITOR_TEXTURE_DATA_H_
OLDNEW
« no previous file with comments | « compositor/real_compositor.cc ('k') | compositor/xrender/xrender_visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698