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

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

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: #include and comment cleanup Created 4 years, 1 month 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
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
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void set_color_space(const gfx::ColorSpace& color_space) { 67 void set_color_space(const gfx::ColorSpace& color_space) {
68 color_space_ = color_space; 68 color_space_ = color_space;
69 } 69 }
70 70
71 // This is valid if allow_overlau() or IsSharedMemory() is true. 71 // This is valid if allow_overlau() or IsSharedMemory() is true.
72 gfx::Size size_in_pixels() const { return size_in_pixels_; } 72 gfx::Size size_in_pixels() const { return size_in_pixels_; }
73 73
74 SharedBitmap* shared_bitmap() const { return shared_bitmap_; } 74 SharedBitmap* shared_bitmap() const { return shared_bitmap_; }
75 size_t SharedMemorySizeInBytes() const; 75 size_t SharedMemorySizeInBytes() const;
76 76
77 #if defined(OS_ANDROID)
78 bool is_backed_by_surface_texture() const {
79 return is_backed_by_surface_texture_;
80 }
81
82 void set_is_backed_by_surface_texture(bool value) {
83 is_backed_by_surface_texture_ = value;
84 }
85 #endif
86
77 private: 87 private:
78 gpu::MailboxHolder mailbox_holder_; 88 gpu::MailboxHolder mailbox_holder_;
79 SharedBitmap* shared_bitmap_; 89 SharedBitmap* shared_bitmap_;
80 gfx::Size size_in_pixels_; 90 gfx::Size size_in_pixels_;
81 bool is_overlay_candidate_; 91 bool is_overlay_candidate_;
92 #if defined(OS_ANDROID)
93 bool is_backed_by_surface_texture_;
94 #endif
82 bool secure_output_only_; 95 bool secure_output_only_;
83 bool nearest_neighbor_; 96 bool nearest_neighbor_;
84 gfx::ColorSpace color_space_; 97 gfx::ColorSpace color_space_;
85 }; 98 };
86 99
87 } // namespace cc 100 } // namespace cc
88 101
89 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ 102 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698