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

Unified Diff: blimp/test/support/compositor/picture_cache_test_support.cc

Issue 2626423004: Remove all //blimp code. (Closed)
Patch Set: One last(?) `git merge` for good measure. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/test/support/compositor/picture_cache_test_support.h ('k') | blimp/tools/Dockerfile.base » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/test/support/compositor/picture_cache_test_support.cc
diff --git a/blimp/test/support/compositor/picture_cache_test_support.cc b/blimp/test/support/compositor/picture_cache_test_support.cc
deleted file mode 100644
index 58cd52fd293320c7843736d81c8fa7a2b245cd5d..0000000000000000000000000000000000000000
--- a/blimp/test/support/compositor/picture_cache_test_support.cc
+++ /dev/null
@@ -1,59 +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 "blimp/test/support/compositor/picture_cache_test_support.h"
-
-#include "base/memory/ptr_util.h"
-#include "blimp/common/blob_cache/blob_cache.h"
-#include "blimp/common/blob_cache/id_util.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkData.h"
-#include "third_party/skia/include/core/SkPicture.h"
-#include "third_party/skia/include/core/SkPictureRecorder.h"
-#include "third_party/skia/include/core/SkRefCnt.h"
-#include "ui/gfx/geometry/point_f.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/geometry/rect_f.h"
-#include "ui/gfx/skia_util.h"
-
-namespace blimp {
-
-sk_sp<const SkPicture> CreateSkPicture(SkColor color) {
- SkPictureRecorder recorder;
- SkCanvas* canvas = recorder.beginRecording(SkRect::MakeWH(1, 1));
- canvas->drawColor(color);
- return recorder.finishRecordingAsPicture();
-}
-
-sk_sp<SkData> SerializePicture(sk_sp<const SkPicture> picture) {
- sk_sp<SkData> data = picture->serialize();
- DCHECK_GT(data->size(), 0u);
- return data;
-}
-
-BlobId GetBlobId(sk_sp<const SkPicture> picture) {
- sk_sp<SkData> data = SerializePicture(picture);
- return CalculateBlobId(data->data(), data->size());
-}
-
-sk_sp<const SkPicture> DeserializePicture(sk_sp<SkData> data) {
- return SkPicture::MakeFromData(data.get());
-}
-
-bool PicturesEqual(sk_sp<const SkPicture> picture,
- const cc::PictureData& picture_data) {
- if (picture->uniqueID() != picture_data.unique_id) {
- return false;
- }
- sk_sp<const SkPicture> deserialized_picture =
- DeserializePicture(picture_data.data);
- return GetBlobId(picture) == GetBlobId(deserialized_picture);
-}
-
-cc::PictureData CreatePictureData(sk_sp<const SkPicture> picture) {
- return cc::PictureData(picture->uniqueID(), SerializePicture(picture));
-}
-
-} // namespace blimp
« no previous file with comments | « blimp/test/support/compositor/picture_cache_test_support.h ('k') | blimp/tools/Dockerfile.base » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698