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

Side by Side Diff: cc/layer_impl_unittest.cc

Issue 11418217: Add skia::RefPtr class to wrap ref counted classes from Skia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_impl.h" 5 #include "cc/layer_impl.h"
6 6
7 #include "cc/single_thread_proxy.h" 7 #include "cc/single_thread_proxy.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/skia/include/effects/SkBlurImageFilter.h" 10 #include "third_party/skia/include/effects/SkBlurImageFilter.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 gfx::Size arbitrarySize = gfx::Size(111, 222); 73 gfx::Size arbitrarySize = gfx::Size(111, 222);
74 gfx::Point arbitraryPoint = gfx::Point(333, 444); 74 gfx::Point arbitraryPoint = gfx::Point(333, 444);
75 gfx::Vector2d arbitraryVector2d = gfx::Vector2d(111, 222); 75 gfx::Vector2d arbitraryVector2d = gfx::Vector2d(111, 222);
76 gfx::Rect arbitraryRect = gfx::Rect(arbitraryPoint, arbitrarySize); 76 gfx::Rect arbitraryRect = gfx::Rect(arbitraryPoint, arbitrarySize);
77 gfx::RectF arbitraryRectF = gfx::RectF(arbitraryPointF, gfx::SizeF(1.234f, 5 .678f)); 77 gfx::RectF arbitraryRectF = gfx::RectF(arbitraryPointF, gfx::SizeF(1.234f, 5 .678f));
78 SkColor arbitraryColor = SkColorSetRGB(10, 20, 30); 78 SkColor arbitraryColor = SkColorSetRGB(10, 20, 30);
79 gfx::Transform arbitraryTransform; 79 gfx::Transform arbitraryTransform;
80 arbitraryTransform.Scale3d(0.1, 0.2, 0.3); 80 arbitraryTransform.Scale3d(0.1, 0.2, 0.3);
81 WebFilterOperations arbitraryFilters; 81 WebFilterOperations arbitraryFilters;
82 arbitraryFilters.append(WebFilterOperation::createOpacityFilter(0.5)); 82 arbitraryFilters.append(WebFilterOperation::createOpacityFilter(0.5));
83 SkAutoTUnref<SkImageFilter> arbitraryFilter(new SkBlurImageFilter(SK_Scalar1 , SK_Scalar1)); 83 SkiaRefPtr<SkImageFilter> arbitraryFilter = SkiaRefPtr<SkImageFilter>::Adopt (new SkBlurImageFilter(SK_Scalar1, SK_Scalar1));
84 84
85 // These properties are internal, and should not be considered "change" when they are used. 85 // These properties are internal, and should not be considered "change" when they are used.
86 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUseLCDText(true)); 86 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUseLCDText(true));
87 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawOpacity(arbitraryNumb er)); 87 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawOpacity(arbitraryNumb er));
88 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setRenderTarget(0)); 88 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setRenderTarget(0));
89 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawTransform(arbitraryTr ansform)); 89 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawTransform(arbitraryTr ansform));
90 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setScreenSpaceTransform(arbi traryTransform)); 90 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setScreenSpaceTransform(arbi traryTransform));
91 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawableContentRect(arbit raryRect)); 91 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawableContentRect(arbit raryRect));
92 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUpdateRect(arbitraryRectF )); 92 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUpdateRect(arbitraryRectF ));
93 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setVisibleContentRect(arbitr aryRect)); 93 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setVisibleContentRect(arbitr aryRect));
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsScale(arbitraryNu mber, arbitraryNumber)); 151 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsScale(arbitraryNu mber, arbitraryNumber));
152 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsOpaque(true)); 152 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsOpaque(true));
153 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setOpacity(arbitraryNumber)) ; 153 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setOpacity(arbitraryNumber)) ;
154 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawsContent(true)); 154 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawsContent(true));
155 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setSublayerTransform(arbitra ryTransform)); 155 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setSublayerTransform(arbitra ryTransform));
156 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setBounds(arbitrarySize)); 156 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setBounds(arbitrarySize));
157 } 157 }
158 158
159 } // namespace 159 } // namespace
160 } // namespace cc 160 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/layer_tree_host_impl.cc » ('j') | cc/skia_refptr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698