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

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

Issue 132163009: [#6]Pass gfx structs by const ref (gfx::Vector2d) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on TOT Created 6 years, 10 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/layer_updater.h ('k') | cc/resources/prioritized_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_PRIORITIZED_RESOURCE_H_ 5 #ifndef CC_RESOURCES_PRIORITIZED_RESOURCE_H_
6 #define CC_RESOURCES_PRIORITIZED_RESOURCE_H_ 6 #define CC_RESOURCES_PRIORITIZED_RESOURCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // on a call-order basis. We might want to just remove this in the future 74 // on a call-order basis. We might want to just remove this in the future
75 // (carefully) and just make sure we don't regress OOMs situations. 75 // (carefully) and just make sure we don't regress OOMs situations.
76 bool RequestLate(); 76 bool RequestLate();
77 77
78 // Update pixels of backing resource from image. This functions will aquire 78 // Update pixels of backing resource from image. This functions will aquire
79 // the backing if needed. 79 // the backing if needed.
80 void SetPixels(ResourceProvider* resource_provider, 80 void SetPixels(ResourceProvider* resource_provider,
81 const uint8_t* image, 81 const uint8_t* image,
82 const gfx::Rect& image_rect, 82 const gfx::Rect& image_rect,
83 const gfx::Rect& source_rect, 83 const gfx::Rect& source_rect,
84 gfx::Vector2d dest_offset); 84 const gfx::Vector2d& dest_offset);
85 85
86 ResourceProvider::ResourceId resource_id() const { 86 ResourceProvider::ResourceId resource_id() const {
87 return backing_ ? backing_->id() : 0; 87 return backing_ ? backing_->id() : 0;
88 } 88 }
89 89
90 // Self-managed textures are accounted for when prioritizing other textures, 90 // Self-managed textures are accounted for when prioritizing other textures,
91 // but they are not allocated/recycled/deleted, so this needs to be done 91 // but they are not allocated/recycled/deleted, so this needs to be done
92 // externally. CanAcquireBackingTexture() indicates if the texture would have 92 // externally. CanAcquireBackingTexture() indicates if the texture would have
93 // been allowed given its priority. 93 // been allowed given its priority.
94 void set_is_self_managed(bool is_self_managed) { 94 void set_is_self_managed(bool is_self_managed) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 Backing* backing_; 177 Backing* backing_;
178 PrioritizedResourceManager* manager_; 178 PrioritizedResourceManager* manager_;
179 179
180 DISALLOW_COPY_AND_ASSIGN(PrioritizedResource); 180 DISALLOW_COPY_AND_ASSIGN(PrioritizedResource);
181 }; 181 };
182 182
183 } // namespace cc 183 } // namespace cc
184 184
185 #endif // CC_RESOURCES_PRIORITIZED_RESOURCE_H_ 185 #endif // CC_RESOURCES_PRIORITIZED_RESOURCE_H_
OLDNEW
« no previous file with comments | « cc/resources/layer_updater.h ('k') | cc/resources/prioritized_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698