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

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

Issue 2440093003: WIP GPU scheduler + delayed activation / tile draw
Patch Set: SignalSyncToken -> IsFenceSyncReleased Created 4 years 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/zero_copy_raster_buffer_provider.h ('k') | cc/resources/resource_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 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 void ZeroCopyRasterBufferProvider::ReleaseBufferForRaster( 98 void ZeroCopyRasterBufferProvider::ReleaseBufferForRaster(
99 std::unique_ptr<RasterBuffer> buffer) { 99 std::unique_ptr<RasterBuffer> buffer) {
100 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. 100 // Nothing to do here. RasterBufferImpl destructor cleans up after itself.
101 } 101 }
102 102
103 void ZeroCopyRasterBufferProvider::OrderingBarrier() { 103 void ZeroCopyRasterBufferProvider::OrderingBarrier() {
104 // No need to sync resources as this provider does not use GL context. 104 // No need to sync resources as this provider does not use GL context.
105 } 105 }
106 106
107 bool ZeroCopyRasterBufferProvider::IsResourceReadyToDraw(
108 const Resource* resource) {
109 return true;
110 }
111
112 void ZeroCopyRasterBufferProvider::SignalResourcesReadyToDraw(
113 const std::vector<const Resource*>& resources,
114 const base::Closure& callback) {
115 if (!callback.is_null())
116 callback.Run();
117 }
118
107 ResourceFormat ZeroCopyRasterBufferProvider::GetResourceFormat( 119 ResourceFormat ZeroCopyRasterBufferProvider::GetResourceFormat(
108 bool must_support_alpha) const { 120 bool must_support_alpha) const {
109 if (resource_provider_->IsResourceFormatSupported(preferred_tile_format_) && 121 if (resource_provider_->IsResourceFormatSupported(preferred_tile_format_) &&
110 (DoesResourceFormatSupportAlpha(preferred_tile_format_) || 122 (DoesResourceFormatSupportAlpha(preferred_tile_format_) ||
111 !must_support_alpha)) { 123 !must_support_alpha)) {
112 return preferred_tile_format_; 124 return preferred_tile_format_;
113 } 125 }
114 126
115 return resource_provider_->best_texture_format(); 127 return resource_provider_->best_texture_format();
116 } 128 }
117 129
118 bool ZeroCopyRasterBufferProvider::IsResourceSwizzleRequired( 130 bool ZeroCopyRasterBufferProvider::IsResourceSwizzleRequired(
119 bool must_support_alpha) const { 131 bool must_support_alpha) const {
120 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); 132 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha));
121 } 133 }
122 134
123 bool ZeroCopyRasterBufferProvider::CanPartialRasterIntoProvidedResource() 135 bool ZeroCopyRasterBufferProvider::CanPartialRasterIntoProvidedResource()
124 const { 136 const {
125 return false; 137 return false;
126 } 138 }
127 139
128 void ZeroCopyRasterBufferProvider::Shutdown() {} 140 void ZeroCopyRasterBufferProvider::Shutdown() {}
129 141
130 } // namespace cc 142 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/zero_copy_raster_buffer_provider.h ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698