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

Side by Side Diff: cc/paint/paint_op_buffer_unittest.cc

Issue 2842333003: cc: Update discardable image metadata generation to get PaintImages. (Closed)
Patch Set: addressed comments Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/paint/paint_op_buffer.h" 5 #include "cc/paint/paint_op_buffer.h"
6 #include "cc/paint/display_item_list.h"
7 #include "cc/test/skia_common.h"
6 #include "cc/test/test_skcanvas.h" 8 #include "cc/test/test_skcanvas.h"
7 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
8 10
9 namespace { 11 namespace {
10 12
11 template <typename T> 13 template <typename T>
12 void CheckRefCnt(const T& obj, int32_t count) { 14 void CheckRefCnt(const T& obj, int32_t count) {
13 // Skia doesn't define getRefCnt in all builds. 15 // Skia doesn't define getRefCnt in all builds.
14 #ifdef SK_DEBUG 16 #ifdef SK_DEBUG
15 EXPECT_EQ(obj->getRefCnt(), count); 17 EXPECT_EQ(obj->getRefCnt(), count);
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 buffer.push<RestoreOp>(); 325 buffer.push<RestoreOp>();
324 326
325 SaveCountingCanvas canvas; 327 SaveCountingCanvas canvas;
326 buffer.playback(&canvas); 328 buffer.playback(&canvas);
327 329
328 EXPECT_EQ(1, canvas.save_count_); 330 EXPECT_EQ(1, canvas.save_count_);
329 EXPECT_EQ(1, canvas.restore_count_); 331 EXPECT_EQ(1, canvas.restore_count_);
330 } 332 }
331 333
332 } // namespace cc 334 } // namespace cc
OLDNEW
« cc/paint/discardable_image_store.cc ('K') | « cc/paint/paint_op_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698