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

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

Issue 2674493003: Add compositor support for half-float RGBA buffers and textures (Closed)
Patch Set: Don't enable on non-ES3 yet Created 3 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/output/software_renderer.cc ('k') | cc/raster/raster_buffer_provider.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 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 int msaa_sample_count) { 42 int msaa_sample_count) {
43 ScopedGpuRaster gpu_raster(context_provider); 43 ScopedGpuRaster gpu_raster(context_provider);
44 44
45 ResourceProvider::ScopedSkSurfaceProvider scoped_surface( 45 ResourceProvider::ScopedSkSurfaceProvider scoped_surface(
46 context_provider, resource_lock, async_worker_context_enabled, 46 context_provider, resource_lock, async_worker_context_enabled,
47 use_distance_field_text, raster_source->CanUseLCDText(), 47 use_distance_field_text, raster_source->CanUseLCDText(),
48 raster_source->HasImpliedColorSpace(), msaa_sample_count); 48 raster_source->HasImpliedColorSpace(), msaa_sample_count);
49 SkSurface* sk_surface = scoped_surface.sk_surface(); 49 SkSurface* sk_surface = scoped_surface.sk_surface();
50 // Allocating an SkSurface will fail after a lost context. Pretend we 50 // Allocating an SkSurface will fail after a lost context. Pretend we
51 // rasterized, as the contents of the resource don't matter anymore. 51 // rasterized, as the contents of the resource don't matter anymore.
52 if (!sk_surface) 52 if (!sk_surface) {
53 DLOG(ERROR) << "Failed to allocate raster surface";
53 return; 54 return;
55 }
54 56
55 // Playback 57 // Playback
56 gfx::Rect playback_rect = raster_full_rect; 58 gfx::Rect playback_rect = raster_full_rect;
57 if (resource_has_previous_content) { 59 if (resource_has_previous_content) {
58 playback_rect.Intersect(raster_dirty_rect); 60 playback_rect.Intersect(raster_dirty_rect);
59 } 61 }
60 DCHECK(!playback_rect.IsEmpty()) 62 DCHECK(!playback_rect.IsEmpty())
61 << "Why are we rastering a tile that's not dirty?"; 63 << "Why are we rastering a tile that's not dirty?";
62 64
63 // Log a histogram of the percentage of pixels that were saved due to 65 // Log a histogram of the percentage of pixels that were saved due to
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 gl->OrderingBarrierCHROMIUM(); 267 gl->OrderingBarrierCHROMIUM();
266 268
267 // Generate sync token after the barrier for cross context synchronization. 269 // Generate sync token after the barrier for cross context synchronization.
268 gpu::SyncToken resource_sync_token; 270 gpu::SyncToken resource_sync_token;
269 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); 271 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData());
270 resource_lock->set_sync_token(resource_sync_token); 272 resource_lock->set_sync_token(resource_sync_token);
271 resource_lock->set_synchronized(!async_worker_context_enabled_); 273 resource_lock->set_synchronized(!async_worker_context_enabled_);
272 } 274 }
273 275
274 } // namespace cc 276 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/raster/raster_buffer_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698