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 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "cc/resource_provider.h" | 7 #include "cc/resource_provider.h" |
8 | 8 |
9 #include <limits.h> | 9 #include <limits.h> |
10 | 10 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 } | 259 } |
260 | 260 |
261 ResourceProvider::ResourceType ResourceProvider::resourceType(ResourceId id) | 261 ResourceProvider::ResourceType ResourceProvider::resourceType(ResourceId id) |
262 { | 262 { |
263 ResourceMap::iterator it = m_resources.find(id); | 263 ResourceMap::iterator it = m_resources.find(id); |
264 CHECK(it != m_resources.end()); | 264 CHECK(it != m_resources.end()); |
265 Resource* resource = &it->second; | 265 Resource* resource = &it->second; |
266 return resource->type; | 266 return resource->type; |
267 } | 267 } |
268 | 268 |
269 void ResourceProvider::upload(ResourceId id, const uint8_t* image, const gfx::Re
ct& imageRect, const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset) | 269 void ResourceProvider::setPixels(ResourceId id, const uint8_t* image, const gfx:
:Rect& imageRect, const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset) |
270 { | 270 { |
271 DCHECK(Proxy::isImplThread()); | 271 DCHECK(Proxy::isImplThread()); |
272 ResourceMap::iterator it = m_resources.find(id); | 272 ResourceMap::iterator it = m_resources.find(id); |
273 CHECK(it != m_resources.end()); | 273 CHECK(it != m_resources.end()); |
274 Resource* resource = &it->second; | 274 Resource* resource = &it->second; |
275 DCHECK(!resource->lockedForWrite); | 275 DCHECK(!resource->lockedForWrite); |
276 DCHECK(!resource->lockForReadCount); | 276 DCHECK(!resource->lockForReadCount); |
277 DCHECK(!resource->external); | 277 DCHECK(!resource->external); |
278 DCHECK(!resource->exported); | 278 DCHECK(!resource->exported); |
279 | 279 |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 g_debugZone = zone; | 709 g_debugZone = zone; |
710 } | 710 } |
711 | 711 |
712 void ResourceProvider::debugNotifyLeaveZone() | 712 void ResourceProvider::debugNotifyLeaveZone() |
713 { | 713 { |
714 g_debugZone = 0; | 714 g_debugZone = 0; |
715 } | 715 } |
716 | 716 |
717 | 717 |
718 } | 718 } |
OLD | NEW |