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

Side by Side Diff: cc/resources/picture_pile_impl_unittest.cc

Issue 111143005: cc: Gather and lock/unlock SkDiscardablePixelRefs instead of skia::LazyPixelRefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "cc/test/fake_picture_pile_impl.h" 6 #include "cc/test/fake_picture_pile_impl.h"
7 #include "cc/test/fake_rendering_stats_instrumentation.h" 7 #include "cc/test/fake_rendering_stats_instrumentation.h"
8 #include "cc/test/skia_common.h" 8 #include "cc/test/skia_common.h"
9 #include "skia/ext/lazy_pixel_ref.h"
10 #include "skia/ext/refptr.h" 9 #include "skia/ext/refptr.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/skia/include/core/SkPixelRef.h" 11 #include "third_party/skia/include/core/SkPixelRef.h"
13 #include "third_party/skia/include/core/SkShader.h" 12 #include "third_party/skia/include/core/SkShader.h"
14 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
15 #include "ui/gfx/size_conversions.h" 14 #include "ui/gfx/size_conversions.h"
16 15
17 namespace cc { 16 namespace cc {
18 namespace { 17 namespace {
19 18
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 738
740 SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels()); 739 SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels());
741 int num_pixels = bitmap.width() * bitmap.height(); 740 int num_pixels = bitmap.width() * bitmap.height();
742 for (int i = 0; i < num_pixels; ++i) { 741 for (int i = 0; i < num_pixels; ++i) {
743 EXPECT_EQ(SkColorGetA(pixels[i]), 0u); 742 EXPECT_EQ(SkColorGetA(pixels[i]), 0u);
744 } 743 }
745 } 744 }
746 745
747 } // namespace 746 } // namespace
748 } // namespace cc 747 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698