| Index: blimp/client/core/compositor/blimp_client_picture_cache_unittest.cc
|
| diff --git a/blimp/client/core/compositor/blimp_client_picture_cache_unittest.cc b/blimp/client/core/compositor/blimp_client_picture_cache_unittest.cc
|
| deleted file mode 100644
|
| index d6f5512a4f83a1a06c3c26f5114a019847bd6d34..0000000000000000000000000000000000000000
|
| --- a/blimp/client/core/compositor/blimp_client_picture_cache_unittest.cc
|
| +++ /dev/null
|
| @@ -1,78 +0,0 @@
|
| -// Copyright 2016 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include "base/memory/ptr_util.h"
|
| -#include "blimp/client/core/compositor/blimp_client_picture_cache.h"
|
| -
|
| -#include <stdint.h>
|
| -#include <memory>
|
| -#include <vector>
|
| -
|
| -#include "blimp/test/support/compositor/picture_cache_test_support.h"
|
| -#include "testing/gtest/include/gtest/gtest.h"
|
| -#include "third_party/skia/include/core/SkColor.h"
|
| -#include "third_party/skia/include/core/SkImage.h"
|
| -#include "third_party/skia/include/core/SkPicture.h"
|
| -#include "third_party/skia/include/core/SkRefCnt.h"
|
| -
|
| -namespace blimp {
|
| -namespace client {
|
| -namespace {
|
| -
|
| -class FakeImageDeserializer final : public SkImageDeserializer {
|
| - public:
|
| - sk_sp<SkImage> makeFromData(SkData* data, const SkIRect* subset) override {
|
| - return nullptr;
|
| - }
|
| -
|
| - sk_sp<SkImage> makeFromMemory(const void* data,
|
| - size_t size,
|
| - const SkIRect* subset) override {
|
| - return nullptr;
|
| - }
|
| -};
|
| -
|
| -class BlimpClientPictureCacheTest : public testing::Test {
|
| - public:
|
| - BlimpClientPictureCacheTest()
|
| - : cache_(base::MakeUnique<FakeImageDeserializer>()) {}
|
| - ~BlimpClientPictureCacheTest() override = default;
|
| -
|
| - protected:
|
| - BlimpClientPictureCache cache_;
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(BlimpClientPictureCacheTest);
|
| -};
|
| -
|
| -TEST_F(BlimpClientPictureCacheTest, TwoSkPicturesInCache) {
|
| - sk_sp<const SkPicture> picture1 = CreateSkPicture(SK_ColorBLUE);
|
| - sk_sp<const SkPicture> picture2 = CreateSkPicture(SK_ColorRED);
|
| - cc::PictureData picture1_data = CreatePictureData(picture1);
|
| - cc::PictureData picture2_data = CreatePictureData(picture2);
|
| -
|
| - std::vector<cc::PictureData> cache_update;
|
| - cache_update.push_back(picture1_data);
|
| - cache_update.push_back(picture2_data);
|
| -
|
| - cache_.ApplyCacheUpdate(cache_update);
|
| -
|
| - cache_.MarkUsed(picture1->uniqueID());
|
| - cache_.MarkUsed(picture2->uniqueID());
|
| -
|
| - sk_sp<const SkPicture> cached_picture1 =
|
| - cache_.GetPicture(picture1->uniqueID());
|
| - EXPECT_NE(nullptr, cached_picture1);
|
| - EXPECT_EQ(GetBlobId(picture1), GetBlobId(cached_picture1));
|
| - sk_sp<const SkPicture> cached_picture2 =
|
| - cache_.GetPicture(picture2->uniqueID());
|
| - EXPECT_NE(nullptr, cached_picture2);
|
| - EXPECT_EQ(GetBlobId(picture2), GetBlobId(cached_picture2));
|
| -
|
| - cache_.Flush();
|
| -}
|
| -
|
| -} // namespace
|
| -} // namespace client
|
| -} // namespace blimp
|
|
|