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

Side by Side Diff: cc/raster/raster_buffer_provider.h

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: ericrk's review 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 #ifndef CC_RASTER_RASTER_BUFFER_PROVIDER_H_ 5 #ifndef CC_RASTER_RASTER_BUFFER_PROVIDER_H_
6 #define CC_RASTER_RASTER_BUFFER_PROVIDER_H_ 6 #define CC_RASTER_RASTER_BUFFER_PROVIDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "cc/playback/raster_source.h" 10 #include "cc/playback/raster_source.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 // Acquire raster buffer. 47 // Acquire raster buffer.
48 virtual std::unique_ptr<RasterBuffer> AcquireBufferForRaster( 48 virtual std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
49 const Resource* resource, 49 const Resource* resource,
50 uint64_t resource_content_id, 50 uint64_t resource_content_id,
51 uint64_t previous_content_id) = 0; 51 uint64_t previous_content_id) = 0;
52 52
53 // Release raster buffer. 53 // Release raster buffer.
54 virtual void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) = 0; 54 virtual void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) = 0;
55 55
56 // Barrier to sync resources to the worker context. 56 // Used for syncing resources to the worker context. Returns false if barrier
57 virtual void OrderingBarrier() = 0; 57 // could not be established.
58 virtual bool OrderingBarrier() = 0;
58 59
59 // Returns the format to use for the tiles. 60 // Returns the format to use for the tiles.
60 virtual ResourceFormat GetResourceFormat(bool must_support_alpha) const = 0; 61 virtual ResourceFormat GetResourceFormat(bool must_support_alpha) const = 0;
61 62
62 // Determine if the resource requires swizzling. 63 // Determine if the resource requires swizzling.
63 virtual bool GetResourceRequiresSwizzle(bool must_support_alpha) const = 0; 64 virtual bool GetResourceRequiresSwizzle(bool must_support_alpha) const = 0;
64 65
65 // Shutdown for doing cleanup. 66 // Shutdown for doing cleanup.
66 virtual void Shutdown() = 0; 67 virtual void Shutdown() = 0;
67 68
68 protected: 69 protected:
69 // Check if resource format matches output format. 70 // Check if resource format matches output format.
70 static bool ResourceFormatRequiresSwizzle(ResourceFormat format); 71 static bool ResourceFormatRequiresSwizzle(ResourceFormat format);
71 }; 72 };
72 73
73 } // namespace cc 74 } // namespace cc
74 75
75 #endif // CC_RASTER_RASTER_BUFFER_PROVIDER_H_ 76 #endif // CC_RASTER_RASTER_BUFFER_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698