| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/occlusion_tracker.h" | 5 #include "cc/occlusion_tracker.h" |
| 6 | 6 |
| 7 #include <public/WebFilterOperation.h> | 7 #include <public/WebFilterOperation.h> |
| 8 #include <public/WebFilterOperations.h> | 8 #include <public/WebFilterOperations.h> |
| 9 | 9 |
| 10 #include "cc/layer.h" | 10 #include "cc/layer.h" |
| 11 #include "cc/layer_animation_controller.h" | 11 #include "cc/layer_animation_controller.h" |
| 12 #include "cc/layer_impl.h" | 12 #include "cc/layer_impl.h" |
| 13 #include "cc/layer_tree_host_common.h" | 13 #include "cc/layer_tree_host_common.h" |
| 14 #include "cc/math_util.h" | 14 #include "cc/math_util.h" |
| 15 #include "cc/overdraw_metrics.h" | 15 #include "cc/overdraw_metrics.h" |
| 16 #include "cc/single_thread_proxy.h" | 16 #include "cc/single_thread_proxy.h" |
| 17 #include "cc/test/animation_test_common.h" | 17 #include "cc/test/animation_test_common.h" |
| 18 #include "cc/test/fake_impl_proxy.h" |
| 19 #include "cc/test/fake_layer_tree_host_impl.h" |
| 18 #include "cc/test/geometry_test_utils.h" | 20 #include "cc/test/geometry_test_utils.h" |
| 19 #include "cc/test/occlusion_tracker_test_common.h" | 21 #include "cc/test/occlusion_tracker_test_common.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 22 #include "ui/gfx/transform.h" | 24 #include "ui/gfx/transform.h" |
| 23 | 25 |
| 24 using namespace WebKit; | 26 using namespace WebKit; |
| 25 using namespace WebKitTests; | 27 using namespace WebKitTests; |
| 26 | 28 |
| 27 namespace cc { | 29 namespace cc { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 52 virtual ~TestContentLayer() | 54 virtual ~TestContentLayer() |
| 53 { | 55 { |
| 54 } | 56 } |
| 55 | 57 |
| 56 bool m_overrideOpaqueContentsRect; | 58 bool m_overrideOpaqueContentsRect; |
| 57 gfx::Rect m_opaqueContentsRect; | 59 gfx::Rect m_opaqueContentsRect; |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 class TestContentLayerImpl : public LayerImpl { | 62 class TestContentLayerImpl : public LayerImpl { |
| 61 public: | 63 public: |
| 62 TestContentLayerImpl(int id) | 64 TestContentLayerImpl(LayerTreeHostImpl* hostImpl, int id) |
| 63 : LayerImpl(id) | 65 : LayerImpl(hostImpl, id) |
| 64 , m_overrideOpaqueContentsRect(false) | 66 , m_overrideOpaqueContentsRect(false) |
| 65 { | 67 { |
| 66 setDrawsContent(true); | 68 setDrawsContent(true); |
| 67 } | 69 } |
| 68 | 70 |
| 69 virtual Region visibleContentOpaqueRegion() const OVERRIDE | 71 virtual Region visibleContentOpaqueRegion() const OVERRIDE |
| 70 { | 72 { |
| 71 if (m_overrideOpaqueContentsRect) | 73 if (m_overrideOpaqueContentsRect) |
| 72 return gfx::IntersectRects(m_opaqueContentsRect, visibleContentRect(
)); | 74 return gfx::IntersectRects(m_opaqueContentsRect, visibleContentRect(
)); |
| 73 return LayerImpl::visibleContentOpaqueRegion(); | 75 return LayerImpl::visibleContentOpaqueRegion(); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 protected: | 114 protected: |
| 113 virtual gfx::Rect layerClipRectInTarget(const LayerType* layer) const { retu
rn m_overrideLayerClipRect ? m_layerClipRect : OcclusionTrackerBase<LayerType, R
enderSurfaceType>::layerClipRectInTarget(layer); } | 115 virtual gfx::Rect layerClipRectInTarget(const LayerType* layer) const { retu
rn m_overrideLayerClipRect ? m_layerClipRect : OcclusionTrackerBase<LayerType, R
enderSurfaceType>::layerClipRectInTarget(layer); } |
| 114 | 116 |
| 115 private: | 117 private: |
| 116 bool m_overrideLayerClipRect; | 118 bool m_overrideLayerClipRect; |
| 117 gfx::Rect m_layerClipRect; | 119 gfx::Rect m_layerClipRect; |
| 118 }; | 120 }; |
| 119 | 121 |
| 120 struct OcclusionTrackerTestMainThreadTypes { | 122 struct OcclusionTrackerTestMainThreadTypes { |
| 121 typedef Layer LayerType; | 123 typedef Layer LayerType; |
| 124 typedef LayerTreeHost HostType; |
| 122 typedef RenderSurface RenderSurfaceType; | 125 typedef RenderSurface RenderSurfaceType; |
| 123 typedef TestContentLayer ContentLayerType; | 126 typedef TestContentLayer ContentLayerType; |
| 124 typedef scoped_refptr<Layer> LayerPtrType; | 127 typedef scoped_refptr<Layer> LayerPtrType; |
| 125 typedef scoped_refptr<ContentLayerType> ContentLayerPtrType; | 128 typedef scoped_refptr<ContentLayerType> ContentLayerPtrType; |
| 126 typedef LayerIterator<Layer, std::vector<scoped_refptr<Layer> >, RenderSurfa
ce, LayerIteratorActions::FrontToBack> TestLayerIterator; | 129 typedef LayerIterator<Layer, std::vector<scoped_refptr<Layer> >, RenderSurfa
ce, LayerIteratorActions::FrontToBack> TestLayerIterator; |
| 127 typedef OcclusionTracker OcclusionTrackerType; | 130 typedef OcclusionTracker OcclusionTrackerType; |
| 128 | 131 |
| 129 static LayerPtrType createLayer() | 132 static LayerPtrType createLayer(HostType*) |
| 130 { | 133 { |
| 131 return Layer::create(); | 134 return Layer::create(); |
| 132 } | 135 } |
| 133 static ContentLayerPtrType createContentLayer() { return make_scoped_refptr(
new ContentLayerType()); } | 136 static ContentLayerPtrType createContentLayer(HostType*) { return make_scope
d_refptr(new ContentLayerType()); } |
| 134 | 137 |
| 135 static LayerPtrType passLayerPtr(ContentLayerPtrType& layer) | 138 static LayerPtrType passLayerPtr(ContentLayerPtrType& layer) |
| 136 { | 139 { |
| 137 LayerPtrType ref(layer); | 140 LayerPtrType ref(layer); |
| 138 layer = NULL; | 141 layer = NULL; |
| 139 return ref; | 142 return ref; |
| 140 } | 143 } |
| 141 | 144 |
| 142 static LayerPtrType passLayerPtr(LayerPtrType& layer) | 145 static LayerPtrType passLayerPtr(LayerPtrType& layer) |
| 143 { | 146 { |
| 144 LayerPtrType ref(layer); | 147 LayerPtrType ref(layer); |
| 145 layer = NULL; | 148 layer = NULL; |
| 146 return ref; | 149 return ref; |
| 147 } | 150 } |
| 148 | 151 |
| 149 static void destroyLayer(LayerPtrType& layer) | 152 static void destroyLayer(LayerPtrType& layer) |
| 150 { | 153 { |
| 151 layer = NULL; | 154 layer = NULL; |
| 152 } | 155 } |
| 153 }; | 156 }; |
| 154 | 157 |
| 155 struct OcclusionTrackerTestImplThreadTypes { | 158 struct OcclusionTrackerTestImplThreadTypes { |
| 156 typedef LayerImpl LayerType; | 159 typedef LayerImpl LayerType; |
| 160 typedef LayerTreeHostImpl HostType; |
| 157 typedef RenderSurfaceImpl RenderSurfaceType; | 161 typedef RenderSurfaceImpl RenderSurfaceType; |
| 158 typedef TestContentLayerImpl ContentLayerType; | 162 typedef TestContentLayerImpl ContentLayerType; |
| 159 typedef scoped_ptr<LayerImpl> LayerPtrType; | 163 typedef scoped_ptr<LayerImpl> LayerPtrType; |
| 160 typedef scoped_ptr<ContentLayerType> ContentLayerPtrType; | 164 typedef scoped_ptr<ContentLayerType> ContentLayerPtrType; |
| 161 typedef LayerIterator<LayerImpl, std::vector<LayerImpl*>, RenderSurfaceImpl,
LayerIteratorActions::FrontToBack> TestLayerIterator; | 165 typedef LayerIterator<LayerImpl, std::vector<LayerImpl*>, RenderSurfaceImpl,
LayerIteratorActions::FrontToBack> TestLayerIterator; |
| 162 typedef OcclusionTrackerImpl OcclusionTrackerType; | 166 typedef OcclusionTrackerImpl OcclusionTrackerType; |
| 163 | 167 |
| 164 static LayerPtrType createLayer() { return LayerImpl::create(nextLayerImplId
++); } | 168 static LayerPtrType createLayer(HostType* host) { return LayerImpl::create(h
ost, nextLayerImplId++); } |
| 165 static ContentLayerPtrType createContentLayer() { return make_scoped_ptr(new
ContentLayerType(nextLayerImplId++)); } | 169 static ContentLayerPtrType createContentLayer(HostType* host) { return make_
scoped_ptr(new ContentLayerType(host, nextLayerImplId++)); } |
| 166 static int nextLayerImplId; | 170 static int nextLayerImplId; |
| 167 | 171 |
| 168 static LayerPtrType passLayerPtr(LayerPtrType& layer) | 172 static LayerPtrType passLayerPtr(LayerPtrType& layer) |
| 169 { | 173 { |
| 170 return layer.Pass(); | 174 return layer.Pass(); |
| 171 } | 175 } |
| 172 | 176 |
| 173 static LayerPtrType passLayerPtr(ContentLayerPtrType& layer) | 177 static LayerPtrType passLayerPtr(ContentLayerPtrType& layer) |
| 174 { | 178 { |
| 175 return layer.PassAs<LayerType>(); | 179 return layer.PassAs<LayerType>(); |
| 176 } | 180 } |
| 177 | 181 |
| 178 static void destroyLayer(LayerPtrType& layer) | 182 static void destroyLayer(LayerPtrType& layer) |
| 179 { | 183 { |
| 180 layer.reset(); | 184 layer.reset(); |
| 181 } | 185 } |
| 182 }; | 186 }; |
| 183 | 187 |
| 184 int OcclusionTrackerTestImplThreadTypes::nextLayerImplId = 1; | 188 int OcclusionTrackerTestImplThreadTypes::nextLayerImplId = 1; |
| 185 | 189 |
| 186 template<typename Types> | 190 template<typename Types> |
| 187 class OcclusionTrackerTest : public testing::Test { | 191 class OcclusionTrackerTest : public testing::Test { |
| 188 protected: | 192 protected: |
| 189 OcclusionTrackerTest(bool opaqueLayers) | 193 OcclusionTrackerTest(bool opaqueLayers) |
| 190 : m_opaqueLayers(opaqueLayers) | 194 : m_hostImpl(&m_proxy) |
| 191 { } | 195 , m_opaqueLayers(opaqueLayers) |
| 196 { |
| 197 } |
| 192 | 198 |
| 193 virtual void runMyTest() = 0; | 199 virtual void runMyTest() = 0; |
| 194 | 200 |
| 195 virtual void TearDown() | 201 virtual void TearDown() |
| 196 { | 202 { |
| 197 Types::destroyLayer(m_root); | 203 Types::destroyLayer(m_root); |
| 198 m_renderSurfaceLayerList.clear(); | 204 m_renderSurfaceLayerList.clear(); |
| 199 m_renderSurfaceLayerListImpl.clear(); | 205 m_renderSurfaceLayerListImpl.clear(); |
| 200 m_replicaLayers.clear(); | 206 m_replicaLayers.clear(); |
| 201 m_maskLayers.clear(); | 207 m_maskLayers.clear(); |
| 202 LayerTreeHost::setNeedsFilterContext(false); | 208 LayerTreeHost::setNeedsFilterContext(false); |
| 203 } | 209 } |
| 204 | 210 |
| 211 typename Types::HostType* getHost(); |
| 212 |
| 205 typename Types::ContentLayerType* createRoot(const gfx::Transform& transform
, const gfx::PointF& position, const gfx::Size& bounds) | 213 typename Types::ContentLayerType* createRoot(const gfx::Transform& transform
, const gfx::PointF& position, const gfx::Size& bounds) |
| 206 { | 214 { |
| 207 typename Types::ContentLayerPtrType layer(Types::createContentLayer()); | 215 typename Types::ContentLayerPtrType layer(Types::createContentLayer(getH
ost())); |
| 208 typename Types::ContentLayerType* layerPtr = layer.get(); | 216 typename Types::ContentLayerType* layerPtr = layer.get(); |
| 209 setProperties(layerPtr, transform, position, bounds); | 217 setProperties(layerPtr, transform, position, bounds); |
| 210 | 218 |
| 211 DCHECK(!m_root); | 219 DCHECK(!m_root); |
| 212 m_root = Types::passLayerPtr(layer); | 220 m_root = Types::passLayerPtr(layer); |
| 213 return layerPtr; | 221 return layerPtr; |
| 214 } | 222 } |
| 215 | 223 |
| 216 typename Types::LayerType* createLayer(typename Types::LayerType* parent, co
nst gfx::Transform& transform, const gfx::PointF& position, const gfx::Size& bou
nds) | 224 typename Types::LayerType* createLayer(typename Types::LayerType* parent, co
nst gfx::Transform& transform, const gfx::PointF& position, const gfx::Size& bou
nds) |
| 217 { | 225 { |
| 218 typename Types::LayerPtrType layer(Types::createLayer()); | 226 typename Types::LayerPtrType layer(Types::createLayer(getHost())); |
| 219 typename Types::LayerType* layerPtr = layer.get(); | 227 typename Types::LayerType* layerPtr = layer.get(); |
| 220 setProperties(layerPtr, transform, position, bounds); | 228 setProperties(layerPtr, transform, position, bounds); |
| 221 parent->addChild(Types::passLayerPtr(layer)); | 229 parent->addChild(Types::passLayerPtr(layer)); |
| 222 return layerPtr; | 230 return layerPtr; |
| 223 } | 231 } |
| 224 | 232 |
| 225 typename Types::LayerType* createSurface(typename Types::LayerType* parent,
const gfx::Transform& transform, const gfx::PointF& position, const gfx::Size& b
ounds) | 233 typename Types::LayerType* createSurface(typename Types::LayerType* parent,
const gfx::Transform& transform, const gfx::PointF& position, const gfx::Size& b
ounds) |
| 226 { | 234 { |
| 227 typename Types::LayerType* layer = createLayer(parent, transform, positi
on, bounds); | 235 typename Types::LayerType* layer = createLayer(parent, transform, positi
on, bounds); |
| 228 WebFilterOperations filters; | 236 WebFilterOperations filters; |
| 229 filters.append(WebFilterOperation::createGrayscaleFilter(0.5)); | 237 filters.append(WebFilterOperation::createGrayscaleFilter(0.5)); |
| 230 layer->setFilters(filters); | 238 layer->setFilters(filters); |
| 231 return layer; | 239 return layer; |
| 232 } | 240 } |
| 233 | 241 |
| 234 typename Types::ContentLayerType* createDrawingLayer(typename Types::LayerTy
pe* parent, const gfx::Transform& transform, const gfx::PointF& position, const
gfx::Size& bounds, bool opaque) | 242 typename Types::ContentLayerType* createDrawingLayer(typename Types::LayerTy
pe* parent, const gfx::Transform& transform, const gfx::PointF& position, const
gfx::Size& bounds, bool opaque) |
| 235 { | 243 { |
| 236 typename Types::ContentLayerPtrType layer(Types::createContentLayer()); | 244 typename Types::ContentLayerPtrType layer(Types::createContentLayer(getH
ost())); |
| 237 typename Types::ContentLayerType* layerPtr = layer.get(); | 245 typename Types::ContentLayerType* layerPtr = layer.get(); |
| 238 setProperties(layerPtr, transform, position, bounds); | 246 setProperties(layerPtr, transform, position, bounds); |
| 239 | 247 |
| 240 if (m_opaqueLayers) | 248 if (m_opaqueLayers) |
| 241 layerPtr->setContentsOpaque(opaque); | 249 layerPtr->setContentsOpaque(opaque); |
| 242 else { | 250 else { |
| 243 layerPtr->setContentsOpaque(false); | 251 layerPtr->setContentsOpaque(false); |
| 244 if (opaque) | 252 if (opaque) |
| 245 layerPtr->setOpaqueContentsRect(gfx::Rect(gfx::Point(), bounds))
; | 253 layerPtr->setOpaqueContentsRect(gfx::Rect(gfx::Point(), bounds))
; |
| 246 else | 254 else |
| 247 layerPtr->setOpaqueContentsRect(gfx::Rect()); | 255 layerPtr->setOpaqueContentsRect(gfx::Rect()); |
| 248 } | 256 } |
| 249 | 257 |
| 250 parent->addChild(Types::passLayerPtr(layer)); | 258 parent->addChild(Types::passLayerPtr(layer)); |
| 251 return layerPtr; | 259 return layerPtr; |
| 252 } | 260 } |
| 253 | 261 |
| 254 typename Types::LayerType* createReplicaLayer(typename Types::LayerType* own
ingLayer, const gfx::Transform& transform, const gfx::PointF& position, const gf
x::Size& bounds) | 262 typename Types::LayerType* createReplicaLayer(typename Types::LayerType* own
ingLayer, const gfx::Transform& transform, const gfx::PointF& position, const gf
x::Size& bounds) |
| 255 { | 263 { |
| 256 typename Types::ContentLayerPtrType layer(Types::createContentLayer()); | 264 typename Types::ContentLayerPtrType layer(Types::createContentLayer(getH
ost())); |
| 257 typename Types::ContentLayerType* layerPtr = layer.get(); | 265 typename Types::ContentLayerType* layerPtr = layer.get(); |
| 258 setProperties(layerPtr, transform, position, bounds); | 266 setProperties(layerPtr, transform, position, bounds); |
| 259 setReplica(owningLayer, Types::passLayerPtr(layer)); | 267 setReplica(owningLayer, Types::passLayerPtr(layer)); |
| 260 return layerPtr; | 268 return layerPtr; |
| 261 } | 269 } |
| 262 | 270 |
| 263 typename Types::LayerType* createMaskLayer(typename Types::LayerType* owning
Layer, const gfx::Size& bounds) | 271 typename Types::LayerType* createMaskLayer(typename Types::LayerType* owning
Layer, const gfx::Size& bounds) |
| 264 { | 272 { |
| 265 typename Types::ContentLayerPtrType layer(Types::createContentLayer()); | 273 typename Types::ContentLayerPtrType layer(Types::createContentLayer(getH
ost())); |
| 266 typename Types::ContentLayerType* layerPtr = layer.get(); | 274 typename Types::ContentLayerType* layerPtr = layer.get(); |
| 267 setProperties(layerPtr, identityMatrix, gfx::PointF(), bounds); | 275 setProperties(layerPtr, identityMatrix, gfx::PointF(), bounds); |
| 268 setMask(owningLayer, Types::passLayerPtr(layer)); | 276 setMask(owningLayer, Types::passLayerPtr(layer)); |
| 269 return layerPtr; | 277 return layerPtr; |
| 270 } | 278 } |
| 271 | 279 |
| 272 typename Types::ContentLayerType* createDrawingSurface(typename Types::Layer
Type* parent, const gfx::Transform& transform, const gfx::PointF& position, cons
t gfx::Size& bounds, bool opaque) | 280 typename Types::ContentLayerType* createDrawingSurface(typename Types::Layer
Type* parent, const gfx::Transform& transform, const gfx::PointF& position, cons
t gfx::Size& bounds, bool opaque) |
| 273 { | 281 { |
| 274 typename Types::ContentLayerType* layer = createDrawingLayer(parent, tra
nsform, position, bounds, opaque); | 282 typename Types::ContentLayerType* layer = createDrawingLayer(parent, tra
nsform, position, bounds, opaque); |
| 275 WebFilterOperations filters; | 283 WebFilterOperations filters; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 { | 400 { |
| 393 owningLayer->setMaskLayer(layer.get()); | 401 owningLayer->setMaskLayer(layer.get()); |
| 394 m_maskLayers.push_back(layer); | 402 m_maskLayers.push_back(layer); |
| 395 } | 403 } |
| 396 | 404 |
| 397 void setMask(LayerImpl* owningLayer, scoped_ptr<LayerImpl> layer) | 405 void setMask(LayerImpl* owningLayer, scoped_ptr<LayerImpl> layer) |
| 398 { | 406 { |
| 399 owningLayer->setMaskLayer(layer.Pass()); | 407 owningLayer->setMaskLayer(layer.Pass()); |
| 400 } | 408 } |
| 401 | 409 |
| 410 FakeImplProxy m_proxy; |
| 411 FakeLayerTreeHostImpl m_hostImpl; |
| 402 bool m_opaqueLayers; | 412 bool m_opaqueLayers; |
| 403 // These hold ownership of the layers for the duration of the test. | 413 // These hold ownership of the layers for the duration of the test. |
| 404 typename Types::LayerPtrType m_root; | 414 typename Types::LayerPtrType m_root; |
| 405 std::vector<scoped_refptr<Layer> > m_renderSurfaceLayerList; | 415 std::vector<scoped_refptr<Layer> > m_renderSurfaceLayerList; |
| 406 std::vector<LayerImpl*> m_renderSurfaceLayerListImpl; | 416 std::vector<LayerImpl*> m_renderSurfaceLayerListImpl; |
| 407 typename Types::TestLayerIterator m_layerIteratorBegin; | 417 typename Types::TestLayerIterator m_layerIteratorBegin; |
| 408 typename Types::TestLayerIterator m_layerIterator; | 418 typename Types::TestLayerIterator m_layerIterator; |
| 409 typename Types::LayerType* m_lastLayerVisited; | 419 typename Types::LayerType* m_lastLayerVisited; |
| 410 std::vector<scoped_refptr<Layer> > m_replicaLayers; | 420 std::vector<scoped_refptr<Layer> > m_replicaLayers; |
| 411 std::vector<scoped_refptr<Layer> > m_maskLayers; | 421 std::vector<scoped_refptr<Layer> > m_maskLayers; |
| 412 }; | 422 }; |
| 413 | 423 |
| 424 template<> |
| 425 LayerTreeHost* OcclusionTrackerTest<OcclusionTrackerTestMainThreadTypes>::getHos
t() |
| 426 { |
| 427 return 0; |
| 428 } |
| 429 |
| 430 template<> |
| 431 LayerTreeHostImpl* OcclusionTrackerTest<OcclusionTrackerTestImplThreadTypes>::ge
tHost() |
| 432 { |
| 433 return &m_hostImpl; |
| 434 } |
| 435 |
| 414 #define RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \ | 436 #define RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \ |
| 415 class ClassName##MainThreadOpaqueLayers : public ClassName<OcclusionTrackerT
estMainThreadTypes> { \ | 437 class ClassName##MainThreadOpaqueLayers : public ClassName<OcclusionTrackerT
estMainThreadTypes> { \ |
| 416 public: \ | 438 public: \ |
| 417 ClassName##MainThreadOpaqueLayers() : ClassName<OcclusionTrackerTestMain
ThreadTypes>(true) { } \ | 439 ClassName##MainThreadOpaqueLayers() : ClassName<OcclusionTrackerTestMain
ThreadTypes>(true) { } \ |
| 418 }; \ | 440 }; \ |
| 419 TEST_F(ClassName##MainThreadOpaqueLayers, runTest) { runMyTest(); } | 441 TEST_F(ClassName##MainThreadOpaqueLayers, runTest) { runMyTest(); } |
| 420 #define RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \ | 442 #define RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \ |
| 421 class ClassName##MainThreadOpaquePaints : public ClassName<OcclusionTrackerT
estMainThreadTypes> { \ | 443 class ClassName##MainThreadOpaquePaints : public ClassName<OcclusionTrackerT
estMainThreadTypes> { \ |
| 422 public: \ | 444 public: \ |
| 423 ClassName##MainThreadOpaquePaints() : ClassName<OcclusionTrackerTestMain
ThreadTypes>(false) { } \ | 445 ClassName##MainThreadOpaquePaints() : ClassName<OcclusionTrackerTestMain
ThreadTypes>(false) { } \ |
| (...skipping 2652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3076 | 3098 |
| 3077 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInScreenSpace().ToString()); | 3099 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInScreenSpace().ToString()); |
| 3078 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInTargetSurface().ToString()); | 3100 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInTargetSurface().ToString()); |
| 3079 } | 3101 } |
| 3080 }; | 3102 }; |
| 3081 | 3103 |
| 3082 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); | 3104 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); |
| 3083 | 3105 |
| 3084 } // namespace | 3106 } // namespace |
| 3085 } // namespace cc | 3107 } // namespace cc |
| OLD | NEW |