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

Side by Side Diff: cc/layer_impl_unittest.cc

Issue 11360093: Mark layers that can use LCD text based on layer transform and opacity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed compile error Created 8 years, 1 month 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/layer_impl.h" 7 #include "cc/layer_impl.h"
8 8
9 #include "cc/single_thread_proxy.h" 9 #include "cc/single_thread_proxy.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 gfx::Rect arbitraryRect = gfx::Rect(arbitraryPoint, arbitrarySize); 78 gfx::Rect arbitraryRect = gfx::Rect(arbitraryPoint, arbitrarySize);
79 gfx::RectF arbitraryRectF = gfx::RectF(arbitraryPointF, gfx::SizeF(1.234f, 5 .678f)); 79 gfx::RectF arbitraryRectF = gfx::RectF(arbitraryPointF, gfx::SizeF(1.234f, 5 .678f));
80 SkColor arbitraryColor = SkColorSetRGB(10, 20, 30); 80 SkColor arbitraryColor = SkColorSetRGB(10, 20, 30);
81 WebTransformationMatrix arbitraryTransform; 81 WebTransformationMatrix arbitraryTransform;
82 arbitraryTransform.scale3d(0.1, 0.2, 0.3); 82 arbitraryTransform.scale3d(0.1, 0.2, 0.3);
83 WebFilterOperations arbitraryFilters; 83 WebFilterOperations arbitraryFilters;
84 arbitraryFilters.append(WebFilterOperation::createOpacityFilter(0.5)); 84 arbitraryFilters.append(WebFilterOperation::createOpacityFilter(0.5));
85 SkAutoTUnref<SkImageFilter> arbitraryFilter(new SkBlurImageFilter(SK_Scalar1 , SK_Scalar1)); 85 SkAutoTUnref<SkImageFilter> arbitraryFilter(new SkBlurImageFilter(SK_Scalar1 , SK_Scalar1));
86 86
87 // These properties are internal, and should not be considered "change" when they are used. 87 // These properties are internal, and should not be considered "change" when they are used.
88 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUseLCDText(true)); 88 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setCanUseLCDText(true));
89 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawOpacity(arbitraryNumb er)); 89 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawOpacity(arbitraryNumb er));
90 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setRenderTarget(0)); 90 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setRenderTarget(0));
91 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawTransform(arbitraryTr ansform)); 91 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawTransform(arbitraryTr ansform));
92 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setScreenSpaceTransform(arbi traryTransform)); 92 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setScreenSpaceTransform(arbi traryTransform));
93 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawableContentRect(arbit raryRect)); 93 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawableContentRect(arbit raryRect));
94 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUpdateRect(arbitraryRectF )); 94 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUpdateRect(arbitraryRectF ));
95 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setVisibleContentRect(arbitr aryRect)); 95 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setVisibleContentRect(arbitr aryRect));
96 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setMaxScrollOffset(arbitrary Vector2d)); 96 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setMaxScrollOffset(arbitrary Vector2d));
97 97
98 // Changing these properties affects the entire subtree of layers. 98 // Changing these properties affects the entire subtree of layers.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsOpaque(true)); 156 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsOpaque(true));
157 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setOpacity(arbitraryNumber)) ; 157 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setOpacity(arbitraryNumber)) ;
158 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDebugBorderColor(arbitrar yColor)); 158 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDebugBorderColor(arbitrar yColor));
159 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDebugBorderWidth(arbitrar yNumber)); 159 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDebugBorderWidth(arbitrar yNumber));
160 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawsContent(true)); 160 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawsContent(true));
161 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setSublayerTransform(arbitra ryTransform)); 161 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setSublayerTransform(arbitra ryTransform));
162 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setBounds(arbitrarySize)); 162 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setBounds(arbitrarySize));
163 } 163 }
164 164
165 } // anonymous namespace 165 } // anonymous namespace
OLDNEW
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/layer_iterator_unittest.cc » ('j') | cc/layer_tree_host_common.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698