mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
123 lines
5 KiB
Diff
123 lines
5 KiB
Diff
|
From 99675941be53b86ed0a3a1027afe9072869cce48 Mon Sep 17 00:00:00 2001
|
||
|
From: Jose Dapena Paz <jose.dapena@lge.com>
|
||
|
Date: Thu, 8 Mar 2018 17:46:02 +0000
|
||
|
Subject: [PATCH 06/10] GCC: PlaybackImageProvider::Settings: explicitely set
|
||
|
copy constructor.
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
GCC fails to resolve the default copy constructor of the flat_map, so
|
||
|
we add an explicit reference to use default copy constructor.
|
||
|
|
||
|
Bug: 819294
|
||
|
|
||
|
Change-Id: Ie2d69bdbe60742e9253251c965cbf0a936037871
|
||
|
Reviewed-on: https://chromium-review.googlesource.com/944403
|
||
|
Reviewed-by: David Reveman <reveman@chromium.org>
|
||
|
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
|
||
|
Cr-Commit-Position: refs/heads/master@{#541827}
|
||
|
---
|
||
|
cc/raster/playback_image_provider.cc | 7 +++++--
|
||
|
cc/raster/playback_image_provider.h | 6 ++++--
|
||
|
cc/raster/playback_image_provider_unittest.cc | 12 ++++++++----
|
||
|
3 files changed, 17 insertions(+), 8 deletions(-)
|
||
|
|
||
|
diff --git a/cc/raster/playback_image_provider.cc b/cc/raster/playback_image_provider.cc
|
||
|
index f2a6682ae183..dbf8530b50e9 100644
|
||
|
--- a/cc/raster/playback_image_provider.cc
|
||
|
+++ b/cc/raster/playback_image_provider.cc
|
||
|
@@ -20,7 +20,7 @@ void UnrefImageFromCache(DrawImage draw_image,
|
||
|
PlaybackImageProvider::PlaybackImageProvider(
|
||
|
ImageDecodeCache* cache,
|
||
|
const gfx::ColorSpace& target_color_space,
|
||
|
- base::Optional<Settings> settings)
|
||
|
+ base::Optional<Settings>&& settings)
|
||
|
: cache_(cache),
|
||
|
target_color_space_(target_color_space),
|
||
|
settings_(std::move(settings)) {
|
||
|
@@ -92,7 +92,10 @@ PlaybackImageProvider::GetDecodedDrawImage(const DrawImage& draw_image) {
|
||
|
}
|
||
|
|
||
|
PlaybackImageProvider::Settings::Settings() = default;
|
||
|
-PlaybackImageProvider::Settings::Settings(const Settings& other) = default;
|
||
|
+PlaybackImageProvider::Settings::Settings(PlaybackImageProvider::Settings&&) =
|
||
|
+ default;
|
||
|
PlaybackImageProvider::Settings::~Settings() = default;
|
||
|
+PlaybackImageProvider::Settings& PlaybackImageProvider::Settings::operator=(
|
||
|
+ PlaybackImageProvider::Settings&&) = default;
|
||
|
|
||
|
} // namespace cc
|
||
|
diff --git a/cc/raster/playback_image_provider.h b/cc/raster/playback_image_provider.h
|
||
|
index bae8c25bfd3e..8c1038e7ff45 100644
|
||
|
--- a/cc/raster/playback_image_provider.h
|
||
|
+++ b/cc/raster/playback_image_provider.h
|
||
|
@@ -20,8 +20,10 @@ class CC_EXPORT PlaybackImageProvider : public ImageProvider {
|
||
|
public:
|
||
|
struct CC_EXPORT Settings {
|
||
|
Settings();
|
||
|
- Settings(const Settings& other);
|
||
|
+ Settings(const Settings&) = delete;
|
||
|
+ Settings(Settings&&);
|
||
|
~Settings();
|
||
|
+ Settings& operator=(Settings&&);
|
||
|
|
||
|
// The set of image ids to skip during raster.
|
||
|
PaintImageIdFlatSet images_to_skip;
|
||
|
@@ -39,7 +41,7 @@ class CC_EXPORT PlaybackImageProvider : public ImageProvider {
|
||
|
// If no settings are provided, all images are skipped during rasterization.
|
||
|
PlaybackImageProvider(ImageDecodeCache* cache,
|
||
|
const gfx::ColorSpace& target_color_space,
|
||
|
- base::Optional<Settings> settings);
|
||
|
+ base::Optional<Settings>&& settings);
|
||
|
~PlaybackImageProvider() override;
|
||
|
|
||
|
void BeginRaster() override;
|
||
|
diff --git a/cc/raster/playback_image_provider_unittest.cc b/cc/raster/playback_image_provider_unittest.cc
|
||
|
index dde64a7b5b50..96a0fdc54a03 100644
|
||
|
--- a/cc/raster/playback_image_provider_unittest.cc
|
||
|
+++ b/cc/raster/playback_image_provider_unittest.cc
|
||
|
@@ -84,7 +84,8 @@ TEST(PlaybackImageProviderTest, SkipsSomeImages) {
|
||
|
settings.emplace();
|
||
|
settings->images_to_skip = {skip_image.stable_id()};
|
||
|
|
||
|
- PlaybackImageProvider provider(&cache, gfx::ColorSpace(), settings);
|
||
|
+ PlaybackImageProvider provider(&cache, gfx::ColorSpace(),
|
||
|
+ std::move(settings));
|
||
|
provider.BeginRaster();
|
||
|
|
||
|
SkIRect rect = SkIRect::MakeWH(10, 10);
|
||
|
@@ -100,7 +101,8 @@ TEST(PlaybackImageProviderTest, RefAndUnrefDecode) {
|
||
|
|
||
|
base::Optional<PlaybackImageProvider::Settings> settings;
|
||
|
settings.emplace();
|
||
|
- PlaybackImageProvider provider(&cache, gfx::ColorSpace(), settings);
|
||
|
+ PlaybackImageProvider provider(&cache, gfx::ColorSpace(),
|
||
|
+ std::move(settings));
|
||
|
provider.BeginRaster();
|
||
|
|
||
|
{
|
||
|
@@ -133,7 +135,8 @@ TEST(PlaybackImageProviderTest, AtRasterImages) {
|
||
|
settings.emplace();
|
||
|
settings->at_raster_images = {draw_image1, draw_image2};
|
||
|
|
||
|
- PlaybackImageProvider provider(&cache, gfx::ColorSpace(), settings);
|
||
|
+ PlaybackImageProvider provider(&cache, gfx::ColorSpace(),
|
||
|
+ std::move(settings));
|
||
|
|
||
|
EXPECT_EQ(cache.refed_image_count(), 0);
|
||
|
provider.BeginRaster();
|
||
|
@@ -158,7 +161,8 @@ TEST(PlaybackImageProviderTest, SwapsGivenFrames) {
|
||
|
settings.emplace();
|
||
|
settings->image_to_current_frame_index = image_to_frame;
|
||
|
|
||
|
- PlaybackImageProvider provider(&cache, gfx::ColorSpace(), settings);
|
||
|
+ PlaybackImageProvider provider(&cache, gfx::ColorSpace(),
|
||
|
+ std::move(settings));
|
||
|
provider.BeginRaster();
|
||
|
|
||
|
SkIRect rect = SkIRect::MakeWH(10, 10);
|
||
|
--
|
||
|
2.16.2
|
||
|
|