| OLD | NEW |
| 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 CC_RESOURCES_RESOURCE_H_ | 5 #ifndef CC_RESOURCES_RESOURCE_H_ |
| 6 #define CC_RESOURCES_RESOURCE_H_ | 6 #define CC_RESOURCES_RESOURCE_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 gfx::Size size() const { return size_; } | 27 gfx::Size size() const { return size_; } |
| 28 ResourceFormat format() const { return format_; } | 28 ResourceFormat format() const { return format_; } |
| 29 const gfx::ColorSpace& color_space() const { return color_space_; } | 29 const gfx::ColorSpace& color_space() const { return color_space_; } |
| 30 | 30 |
| 31 protected: | 31 protected: |
| 32 void set_id(ResourceId id) { id_ = id; } | 32 void set_id(ResourceId id) { id_ = id; } |
| 33 void set_dimensions(const gfx::Size& size, ResourceFormat format) { | 33 void set_dimensions(const gfx::Size& size, ResourceFormat format) { |
| 34 size_ = size; | 34 size_ = size; |
| 35 format_ = format; | 35 format_ = format; |
| 36 } | 36 } |
| 37 void set_color_space(const gfx::ColorSpace& color_space) { |
| 38 color_space_ = color_space; |
| 39 } |
| 37 | 40 |
| 38 private: | 41 private: |
| 39 ResourceId id_; | 42 ResourceId id_; |
| 40 gfx::Size size_; | 43 gfx::Size size_; |
| 41 ResourceFormat format_; | 44 ResourceFormat format_; |
| 42 gfx::ColorSpace color_space_; | 45 gfx::ColorSpace color_space_; |
| 43 | 46 |
| 44 DISALLOW_COPY_AND_ASSIGN(Resource); | 47 DISALLOW_COPY_AND_ASSIGN(Resource); |
| 45 }; | 48 }; |
| 46 | 49 |
| 47 } // namespace cc | 50 } // namespace cc |
| 48 | 51 |
| 49 #endif // CC_RESOURCES_RESOURCE_H_ | 52 #endif // CC_RESOURCES_RESOURCE_H_ |
| OLD | NEW |