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

Side by Side Diff: cc/resources/resource.h

Issue 2240873003: Fix a bug that prevents all reuse of ResourcePool resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | cc/resources/scoped_resource.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 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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/scoped_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698