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

Side by Side Diff: cc/resources/resource_provider.cc

Issue 2496913003: Display linear-srgb color managed canvas (Closed)
Patch Set: Removing Failure lines from TestExpectations 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
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.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 #include "cc/resources/resource_provider.h" 5 #include "cc/resources/resource_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 } 1253 }
1254 1254
1255 ResourceProvider::ScopedReadLockSkImage::~ScopedReadLockSkImage() { 1255 ResourceProvider::ScopedReadLockSkImage::~ScopedReadLockSkImage() {
1256 resource_provider_->UnlockForRead(resource_id_); 1256 resource_provider_->UnlockForRead(resource_id_);
1257 } 1257 }
1258 1258
1259 ResourceProvider::ScopedWriteLockSoftware::ScopedWriteLockSoftware( 1259 ResourceProvider::ScopedWriteLockSoftware::ScopedWriteLockSoftware(
1260 ResourceProvider* resource_provider, 1260 ResourceProvider* resource_provider,
1261 ResourceId resource_id) 1261 ResourceId resource_id)
1262 : resource_provider_(resource_provider), resource_id_(resource_id) { 1262 : resource_provider_(resource_provider), resource_id_(resource_id) {
1263 resource_provider->PopulateSkBitmapWithResource( 1263 Resource* resource = resource_provider->LockForWrite(resource_id);
1264 &sk_bitmap_, resource_provider->LockForWrite(resource_id)); 1264 resource_provider->PopulateSkBitmapWithResource(&sk_bitmap_, resource);
1265 sk_color_space_ = resource_provider->GetResourceSkColorSpace(resource);
1265 DCHECK(valid()); 1266 DCHECK(valid());
1266 } 1267 }
1267 1268
1268 ResourceProvider::ScopedWriteLockSoftware::~ScopedWriteLockSoftware() { 1269 ResourceProvider::ScopedWriteLockSoftware::~ScopedWriteLockSoftware() {
1269 DCHECK(thread_checker_.CalledOnValidThread()); 1270 DCHECK(thread_checker_.CalledOnValidThread());
1270 Resource* resource = resource_provider_->GetResource(resource_id_); 1271 Resource* resource = resource_provider_->GetResource(resource_id_);
1271 DCHECK(resource); 1272 DCHECK(resource);
1272 resource->SetSynchronized(); 1273 resource->SetSynchronized();
1273 resource_provider_->UnlockForWrite(resource); 1274 resource_provider_->UnlockForWrite(resource);
1274 } 1275 }
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 2059
2059 const int kImportance = 2; 2060 const int kImportance = 2;
2060 pmd->CreateSharedGlobalAllocatorDump(guid); 2061 pmd->CreateSharedGlobalAllocatorDump(guid);
2061 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance); 2062 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance);
2062 } 2063 }
2063 2064
2064 return true; 2065 return true;
2065 } 2066 }
2066 2067
2067 } // namespace cc 2068 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698