Commit dc53a1b2 authored by Antoine Labour's avatar Antoine Labour Committed by Commit Bot

Remove viz::internal::Resource functionality from LTRP

It is not used any more \o/

Bug: 738190
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ic0bfa65a3ed9c43ff28450c305abbf7d0a93d3a5
Reviewed-on: https://chromium-review.googlesource.com/1023160
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553453}
parent a045a7ff
......@@ -51,12 +51,6 @@ class CC_EXPORT LayerTreeResourceProvider : public ResourceProvider {
void ReceiveReturnsFromParent(
const std::vector<viz::ReturnedResource>& transferable_resources);
viz::ResourceId CreateGpuTextureResource(const gfx::Size& size,
viz::ResourceFormat format,
const gfx::ColorSpace& color_space);
void DeleteResource(viz::ResourceId id);
// Receives a resource from an external client that can be used in compositor
// frames, via the returned ResourceId.
viz::ResourceId ImportResource(const viz::TransferableResource&,
......@@ -64,11 +58,6 @@ class CC_EXPORT LayerTreeResourceProvider : public ResourceProvider {
// Removes an imported resource, which will call the ReleaseCallback given
// originally, once the resource is no longer in use by any compositor frame.
void RemoveImportedResource(viz::ResourceId);
// Update pixels from image, copying source_rect (in image) to dest_offset (in
// the resource).
void CopyToResource(viz::ResourceId id,
const uint8_t* image,
const gfx::Size& image_size);
// Verify that the ResourceId is valid and is known to this class, for debug
// checks.
......@@ -108,8 +97,6 @@ class CC_EXPORT LayerTreeResourceProvider : public ResourceProvider {
return gpu_memory_buffer_manager_;
}
void LoseResourceForTesting(viz::ResourceId id);
class CC_EXPORT ScopedSkSurface {
public:
ScopedSkSurface(GrContext* gr_context,
......@@ -139,30 +126,14 @@ class CC_EXPORT LayerTreeResourceProvider : public ResourceProvider {
const viz::ResourceSettings& resource_settings);
int max_texture_size = 0;
bool use_texture_storage = false;
bool use_texture_format_bgra = false;
bool use_texture_usage_hint = false;
bool use_texture_npot = false;
bool use_sync_query = false;
bool use_texture_storage_image = false;
viz::ResourceType default_resource_type = viz::ResourceType::kTexture;
viz::ResourceFormat yuv_resource_format = viz::LUMINANCE_8;
viz::ResourceFormat yuv_highbit_resource_format = viz::LUMINANCE_8;
viz::ResourceFormat best_texture_format = viz::RGBA_8888;
viz::ResourceFormat best_render_buffer_format = viz::RGBA_8888;
bool use_gpu_memory_buffer_resources = false;
bool delegated_sync_points_required = false;
} const settings_;
// base::trace_event::MemoryDumpProvider implementation.
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) override;
void CreateAndBindImage(viz::internal::Resource* resource);
void TransferResource(viz::internal::Resource* source,
viz::ResourceId id,
viz::TransferableResource* resource);
struct ImportedResource;
base::flat_map<viz::ResourceId, ImportedResource> imported_resources_;
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
......
......@@ -163,7 +163,14 @@ TEST_F(ResourcePoolTest, LostResource) {
SetBackingOnResource(resource);
resource_pool_->PrepareForExport(resource);
resource_provider_->LoseResourceForTesting(resource.resource_id_for_export());
std::vector<viz::ResourceId> export_ids = {resource.resource_id_for_export()};
std::vector<viz::TransferableResource> transferable_resources;
resource_provider_->PrepareSendToParent(export_ids, &transferable_resources);
auto returned_resources =
viz::TransferableResource::ReturnResources(transferable_resources);
ASSERT_EQ(1u, returned_resources.size());
returned_resources[0].lost = true;
resource_provider_->ReceiveReturnsFromParent(returned_resources);
EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
resource_pool_->ReleaseResource(std::move(resource));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment