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

Side by Side Diff: cc/raster/gpu_raster_buffer_provider.cc

Issue 2752523006: cc: Use SkCreateColorSpaceXformCanvas for color transforms (Closed)
Patch Set: Rebase Created 3 years, 9 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/raster/bitmap_raster_buffer_provider.cc ('k') | cc/raster/one_copy_raster_buffer_provider.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/raster/gpu_raster_buffer_provider.h" 5 #include "cc/raster/gpu_raster_buffer_provider.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (full_rect_size > 0 && client_name) { 70 if (full_rect_size > 0 && client_name) {
71 float fraction_partial_rastered = 71 float fraction_partial_rastered =
72 static_cast<float>(playback_rect.size().GetArea()) / full_rect_size; 72 static_cast<float>(playback_rect.size().GetArea()) / full_rect_size;
73 float fraction_saved = 1.0f - fraction_partial_rastered; 73 float fraction_saved = 1.0f - fraction_partial_rastered;
74 UMA_HISTOGRAM_PERCENTAGE( 74 UMA_HISTOGRAM_PERCENTAGE(
75 base::StringPrintf("Renderer4.%s.PartialRasterPercentageSaved.Gpu", 75 base::StringPrintf("Renderer4.%s.PartialRasterPercentageSaved.Gpu",
76 client_name), 76 client_name),
77 100.0f * fraction_saved); 77 100.0f * fraction_saved);
78 } 78 }
79 79
80 raster_source->PlaybackToCanvas(sk_surface->getCanvas(), raster_full_rect, 80 raster_source->PlaybackToCanvas(
81 playback_rect, scale, playback_settings); 81 sk_surface->getCanvas(), resource_lock->color_space_for_raster(),
82 raster_full_rect, playback_rect, scale, playback_settings);
82 } 83 }
83 84
84 } // namespace 85 } // namespace
85 86
86 GpuRasterBufferProvider::RasterBufferImpl::RasterBufferImpl( 87 GpuRasterBufferProvider::RasterBufferImpl::RasterBufferImpl(
87 GpuRasterBufferProvider* client, 88 GpuRasterBufferProvider* client,
88 ResourceProvider* resource_provider, 89 ResourceProvider* resource_provider,
89 ResourceId resource_id, 90 ResourceId resource_id,
90 bool async_worker_context_enabled, 91 bool async_worker_context_enabled,
91 bool resource_has_previous_content) 92 bool resource_has_previous_content)
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 gl->OrderingBarrierCHROMIUM(); 270 gl->OrderingBarrierCHROMIUM();
270 271
271 // Generate sync token after the barrier for cross context synchronization. 272 // Generate sync token after the barrier for cross context synchronization.
272 gpu::SyncToken resource_sync_token; 273 gpu::SyncToken resource_sync_token;
273 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); 274 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData());
274 resource_lock->set_sync_token(resource_sync_token); 275 resource_lock->set_sync_token(resource_sync_token);
275 resource_lock->set_synchronized(!async_worker_context_enabled_); 276 resource_lock->set_synchronized(!async_worker_context_enabled_);
276 } 277 }
277 278
278 } // namespace cc 279 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/bitmap_raster_buffer_provider.cc ('k') | cc/raster/one_copy_raster_buffer_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698