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

Unified Diff: cc/tiles/decoded_image_tracker_unittest.cc

Issue 2928433003: cc: Add scaling for checkered images. (Closed)
Patch Set: .. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/tiles/decoded_image_tracker.cc ('k') | cc/tiles/image_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/decoded_image_tracker_unittest.cc
diff --git a/cc/tiles/decoded_image_tracker_unittest.cc b/cc/tiles/decoded_image_tracker_unittest.cc
index a1c9ade851395a1948343010908d07e7888df075..ff04d2b432100e1015f188e7bc01bbd2ec3afb00 100644
--- a/cc/tiles/decoded_image_tracker_unittest.cc
+++ b/cc/tiles/decoded_image_tracker_unittest.cc
@@ -5,6 +5,7 @@
#include <vector>
#include "base/bind.h"
+#include "cc/test/skia_common.h"
#include "cc/tiles/decoded_image_tracker.h"
#include "cc/tiles/image_controller.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,7 +23,7 @@ class TestImageController : public ImageController {
}
ImageDecodeRequestId QueueImageDecode(
- sk_sp<const SkImage> image,
+ const DrawImage& image,
const ImageDecodedCallback& callback) override {
auto id = next_id_++;
locked_ids_.push_back(id);
@@ -56,7 +57,8 @@ class DecodedImageTrackerTest : public testing::Test {
TEST_F(DecodedImageTrackerTest, QueueImageLocksImages) {
bool locked = false;
decoded_image_tracker()->QueueImageDecode(
- PaintImage(),
+ PaintImage(PaintImage::GetNextId(),
+ CreateDiscardableImage(gfx::Size(1, 1))),
base::Bind([](bool* locked, bool success) { *locked = true; },
base::Unretained(&locked)));
EXPECT_TRUE(locked);
@@ -66,7 +68,8 @@ TEST_F(DecodedImageTrackerTest, QueueImageLocksImages) {
TEST_F(DecodedImageTrackerTest, NotifyFrameFinishedUnlocksImages) {
bool locked = false;
decoded_image_tracker()->QueueImageDecode(
- PaintImage(),
+ PaintImage(PaintImage::GetNextId(),
+ CreateDiscardableImage(gfx::Size(1, 1))),
base::Bind([](bool* locked, bool success) { *locked = true; },
base::Unretained(&locked)));
EXPECT_TRUE(locked);
@@ -77,7 +80,8 @@ TEST_F(DecodedImageTrackerTest, NotifyFrameFinishedUnlocksImages) {
locked = false;
decoded_image_tracker()->QueueImageDecode(
- PaintImage(),
+ PaintImage(PaintImage::GetNextId(),
+ CreateDiscardableImage(gfx::Size(1, 1))),
base::Bind([](bool* locked, bool success) { *locked = true; },
base::Unretained(&locked)));
EXPECT_TRUE(locked);
« no previous file with comments | « cc/tiles/decoded_image_tracker.cc ('k') | cc/tiles/image_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698