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

Side by Side Diff: cc/raster/zero_copy_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_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_ 5 #ifndef CC_RASTER_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_
6 #define CC_RASTER_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_ 6 #define CC_RASTER_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 17 matching lines...) Expand all
28 static std::unique_ptr<RasterBufferProvider> Create( 28 static std::unique_ptr<RasterBufferProvider> Create(
29 ResourceProvider* resource_provider, 29 ResourceProvider* resource_provider,
30 ResourceFormat preferred_tile_format); 30 ResourceFormat preferred_tile_format);
31 31
32 // Overridden from RasterBufferProvider: 32 // Overridden from RasterBufferProvider:
33 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( 33 std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
34 const Resource* resource, 34 const Resource* resource,
35 uint64_t resource_content_id, 35 uint64_t resource_content_id,
36 uint64_t previous_content_id) override; 36 uint64_t previous_content_id) override;
37 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; 37 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override;
38 void OrderingBarrier() override; 38 bool OrderingBarrier() override;
39 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; 39 ResourceFormat GetResourceFormat(bool must_support_alpha) const override;
40 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; 40 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override;
41 void Shutdown() override; 41 void Shutdown() override;
42 42
43 protected: 43 protected:
44 ZeroCopyRasterBufferProvider(ResourceProvider* resource_provider, 44 ZeroCopyRasterBufferProvider(ResourceProvider* resource_provider,
45 ResourceFormat preferred_tile_format); 45 ResourceFormat preferred_tile_format);
46 46
47 private: 47 private:
48 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() 48 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue()
49 const; 49 const;
50 50
51 ResourceProvider* resource_provider_; 51 ResourceProvider* resource_provider_;
52 ResourceFormat preferred_tile_format_; 52 ResourceFormat preferred_tile_format_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(ZeroCopyRasterBufferProvider); 54 DISALLOW_COPY_AND_ASSIGN(ZeroCopyRasterBufferProvider);
55 }; 55 };
56 56
57 } // namespace cc 57 } // namespace cc
58 58
59 #endif // CC_RASTER_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_ 59 #endif // CC_RASTER_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698