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

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

Issue 2161293002: Color: Separate ICCProfile and ColorSpace structures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporate review feedback Created 4 years, 5 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 | « cc/resources/resource_provider.cc ('k') | cc/resources/transferable_resource.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_TEXTURE_MAILBOX_H_ 5 #ifndef CC_RESOURCES_TEXTURE_MAILBOX_H_
6 #define CC_RESOURCES_TEXTURE_MAILBOX_H_ 6 #define CC_RESOURCES_TEXTURE_MAILBOX_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/memory/shared_memory.h" 13 #include "base/memory/shared_memory.h"
14 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
15 #include "gpu/command_buffer/common/mailbox_holder.h" 15 #include "gpu/command_buffer/common/mailbox_holder.h"
16 #include "ui/gfx/color_space.h"
16 #include "ui/gfx/geometry/size.h" 17 #include "ui/gfx/geometry/size.h"
17 18
18 namespace cc { 19 namespace cc {
19 class SharedBitmap; 20 class SharedBitmap;
20 21
21 // TODO(skaslev, danakj) Rename this class more apropriately since now it 22 // TODO(skaslev, danakj) Rename this class more apropriately since now it
22 // can hold a shared memory resource as well as a texture mailbox. 23 // can hold a shared memory resource as well as a texture mailbox.
23 class CC_EXPORT TextureMailbox { 24 class CC_EXPORT TextureMailbox {
24 public: 25 public:
25 TextureMailbox(); 26 TextureMailbox();
(...skipping 29 matching lines...) Expand all
55 void set_sync_token(const gpu::SyncToken& sync_token) { 56 void set_sync_token(const gpu::SyncToken& sync_token) {
56 mailbox_holder_.sync_token = sync_token; 57 mailbox_holder_.sync_token = sync_token;
57 } 58 }
58 59
59 bool is_overlay_candidate() const { return is_overlay_candidate_; } 60 bool is_overlay_candidate() const { return is_overlay_candidate_; }
60 bool secure_output_only() const { return secure_output_only_; } 61 bool secure_output_only() const { return secure_output_only_; }
61 bool nearest_neighbor() const { return nearest_neighbor_; } 62 bool nearest_neighbor() const { return nearest_neighbor_; }
62 void set_nearest_neighbor(bool nearest_neighbor) { 63 void set_nearest_neighbor(bool nearest_neighbor) {
63 nearest_neighbor_ = nearest_neighbor; 64 nearest_neighbor_ = nearest_neighbor;
64 } 65 }
66 const gfx::ColorSpace& color_space() const { return color_space_; }
67 void set_color_space(const gfx::ColorSpace& color_space) {
68 color_space_ = color_space;
69 }
65 70
66 // This is valid if allow_overlau() or IsSharedMemory() is true. 71 // This is valid if allow_overlau() or IsSharedMemory() is true.
67 gfx::Size size_in_pixels() const { return size_in_pixels_; } 72 gfx::Size size_in_pixels() const { return size_in_pixels_; }
68 73
69 SharedBitmap* shared_bitmap() const { return shared_bitmap_; } 74 SharedBitmap* shared_bitmap() const { return shared_bitmap_; }
70 size_t SharedMemorySizeInBytes() const; 75 size_t SharedMemorySizeInBytes() const;
71 76
72 private: 77 private:
73 gpu::MailboxHolder mailbox_holder_; 78 gpu::MailboxHolder mailbox_holder_;
74 SharedBitmap* shared_bitmap_; 79 SharedBitmap* shared_bitmap_;
75 gfx::Size size_in_pixels_; 80 gfx::Size size_in_pixels_;
76 bool is_overlay_candidate_; 81 bool is_overlay_candidate_;
77 bool secure_output_only_; 82 bool secure_output_only_;
78 bool nearest_neighbor_; 83 bool nearest_neighbor_;
84 gfx::ColorSpace color_space_;
79 }; 85 };
80 86
81 } // namespace cc 87 } // namespace cc
82 88
83 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ 89 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/transferable_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698