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

Unified Diff: cc/resources/resource_provider.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/resource_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 06bb5f0017170fd360e0c5b807a08e17bd846e4d..636e797900b85e7386efbd3e558e87f6fe09869a 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -794,9 +794,9 @@ void ResourceProvider::SetPixels(ResourceId id,
image += source_offset.y() * image_row_bytes + source_offset.x() * 4;
ScopedWriteLockSoftware lock(this, id);
- SkCanvas* dest = lock.sk_canvas();
- dest->writePixels(
- source_info, image, image_row_bytes, dest_offset.x(), dest_offset.y());
+ SkCanvas dest(lock.sk_bitmap());
+ dest.writePixels(source_info, image, image_row_bytes, dest_offset.x(),
+ dest_offset.y());
}
}
@@ -1038,7 +1038,6 @@ ResourceProvider::ScopedWriteLockSoftware::ScopedWriteLockSoftware(
resource_(resource_provider->LockForWrite(resource_id)) {
ResourceProvider::PopulateSkBitmapWithResource(&sk_bitmap_, resource_);
DCHECK(valid());
- sk_canvas_.reset(new SkCanvas(sk_bitmap_));
}
ResourceProvider::ScopedWriteLockSoftware::~ScopedWriteLockSoftware() {
@@ -2077,7 +2076,7 @@ void ResourceProvider::CopyResource(ResourceId source_id, ResourceId dest_id) {
DCHECK(dest_resource->origin == Resource::Internal);
DCHECK_EQ(dest_resource->exported_count, 0);
DCHECK_EQ(GLTexture, dest_resource->type);
- LazyCreate(dest_resource);
+ LazyAllocate(dest_resource);
DCHECK_EQ(source_resource->type, dest_resource->type);
DCHECK_EQ(source_resource->format, dest_resource->format);
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/resource_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698