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

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

Issue 1951193002: cc: Add mailbox support to ResourceProvider write locks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@worker_context_stream
Patch Set: rebase Created 4 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/zero_copy_raster_buffer_provider.h" 5 #include "cc/raster/zero_copy_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 DCHECK_GE(buffer->stride(0), 0); 48 DCHECK_GE(buffer->stride(0), 0);
49 49
50 // TODO(danakj): Implement partial raster with raster_dirty_rect. 50 // TODO(danakj): Implement partial raster with raster_dirty_rect.
51 RasterBufferProvider::PlaybackToMemory( 51 RasterBufferProvider::PlaybackToMemory(
52 buffer->memory(0), resource_->format(), resource_->size(), 52 buffer->memory(0), resource_->format(), resource_->size(),
53 buffer->stride(0), raster_source, raster_full_rect, raster_full_rect, 53 buffer->stride(0), raster_source, raster_full_rect, raster_full_rect,
54 scale, playback_settings); 54 scale, playback_settings);
55 buffer->Unmap(); 55 buffer->Unmap();
56 } 56 }
57 57
58 void SetSyncToken(const gpu::SyncToken& sync_token) override { NOTREACHED(); }
59
58 private: 60 private:
59 ResourceProvider::ScopedWriteLockGpuMemoryBuffer lock_; 61 ResourceProvider::ScopedWriteLockGpuMemoryBuffer lock_;
60 const Resource* resource_; 62 const Resource* resource_;
61 63
62 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); 64 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl);
63 }; 65 };
64 66
65 } // namespace 67 } // namespace
66 68
67 // static 69 // static
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 113 }
112 114
113 bool ZeroCopyRasterBufferProvider::GetResourceRequiresSwizzle( 115 bool ZeroCopyRasterBufferProvider::GetResourceRequiresSwizzle(
114 bool must_support_alpha) const { 116 bool must_support_alpha) const {
115 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); 117 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha));
116 } 118 }
117 119
118 void ZeroCopyRasterBufferProvider::Shutdown() {} 120 void ZeroCopyRasterBufferProvider::Shutdown() {}
119 121
120 } // namespace cc 122 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698