| 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/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
| 10 #include "cc/debug/test_web_graphics_context_3d.h" | 10 #include "cc/debug/test_web_graphics_context_3d.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 private: | 136 private: |
| 137 int frame_; | 137 int frame_; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 class FakeRendererClient : public RendererClient { | 140 class FakeRendererClient : public RendererClient { |
| 141 public: | 141 public: |
| 142 FakeRendererClient() | 142 FakeRendererClient() |
| 143 : host_impl_(&proxy_), | 143 : host_impl_(&proxy_), |
| 144 set_full_root_layer_damage_count_(0), | 144 set_full_root_layer_damage_count_(0), |
| 145 root_layer_(LayerImpl::Create(host_impl_.active_tree(), 1)), | 145 root_layer_(LayerImpl::Create(host_impl_.active_tree(), 1)), |
| 146 viewport_size_(gfx::Size(1, 1)) { | 146 viewport_(gfx::Rect(0, 0, 1, 1)), |
| 147 clip_(gfx::Rect(0, 0, 1, 1)) { |
| 147 root_layer_->CreateRenderSurface(); | 148 root_layer_->CreateRenderSurface(); |
| 148 RenderPass::Id render_pass_id = | 149 RenderPass::Id render_pass_id = |
| 149 root_layer_->render_surface()->RenderPassId(); | 150 root_layer_->render_surface()->RenderPassId(); |
| 150 scoped_ptr<RenderPass> root_render_pass = RenderPass::Create(); | 151 scoped_ptr<RenderPass> root_render_pass = RenderPass::Create(); |
| 151 root_render_pass->SetNew( | 152 root_render_pass->SetNew( |
| 152 render_pass_id, gfx::Rect(), gfx::Rect(), gfx::Transform()); | 153 render_pass_id, gfx::Rect(), gfx::Rect(), gfx::Transform()); |
| 153 render_passes_in_draw_order_.push_back(root_render_pass.Pass()); | 154 render_passes_in_draw_order_.push_back(root_render_pass.Pass()); |
| 154 } | 155 } |
| 155 | 156 |
| 156 // RendererClient methods. | 157 // RendererClient methods. |
| 157 virtual gfx::Rect DeviceViewport() const OVERRIDE { | 158 virtual gfx::Rect DeviceViewport() const OVERRIDE { return viewport_; } |
| 158 static gfx::Size fake_size(1, 1); | 159 virtual gfx::Rect DeviceClip() const OVERRIDE { return clip_; } |
| 159 return gfx::Rect(fake_size); | |
| 160 } | |
| 161 virtual gfx::Rect DeviceClip() const OVERRIDE { return DeviceViewport(); } | |
| 162 virtual void SetFullRootLayerDamage() OVERRIDE { | 160 virtual void SetFullRootLayerDamage() OVERRIDE { |
| 163 set_full_root_layer_damage_count_++; | 161 set_full_root_layer_damage_count_++; |
| 164 } | 162 } |
| 165 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE { | 163 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE { |
| 166 return CompositorFrameMetadata(); | 164 return CompositorFrameMetadata(); |
| 167 } | 165 } |
| 168 | 166 |
| 169 // Methods added for test. | 167 // Methods added for test. |
| 170 int set_full_root_layer_damage_count() const { | 168 int set_full_root_layer_damage_count() const { |
| 171 return set_full_root_layer_damage_count_; | 169 return set_full_root_layer_damage_count_; |
| 172 } | 170 } |
| 173 void set_viewport(gfx::Size viewport_size) { viewport_size_ = viewport_size; } | 171 void set_viewport(gfx::Rect viewport) { viewport_ = viewport; } |
| 172 void set_clip(gfx::Rect clip) { clip_ = clip; } |
| 174 | 173 |
| 175 RenderPass* root_render_pass() { return render_passes_in_draw_order_.back(); } | 174 RenderPass* root_render_pass() { return render_passes_in_draw_order_.back(); } |
| 176 RenderPassList* render_passes_in_draw_order() { | 175 RenderPassList* render_passes_in_draw_order() { |
| 177 return &render_passes_in_draw_order_; | 176 return &render_passes_in_draw_order_; |
| 178 } | 177 } |
| 179 | 178 |
| 180 private: | 179 private: |
| 181 FakeImplProxy proxy_; | 180 FakeImplProxy proxy_; |
| 182 FakeLayerTreeHostImpl host_impl_; | 181 FakeLayerTreeHostImpl host_impl_; |
| 183 int set_full_root_layer_damage_count_; | 182 int set_full_root_layer_damage_count_; |
| 184 scoped_ptr<LayerImpl> root_layer_; | 183 scoped_ptr<LayerImpl> root_layer_; |
| 185 RenderPassList render_passes_in_draw_order_; | 184 RenderPassList render_passes_in_draw_order_; |
| 186 gfx::Size viewport_size_; | 185 gfx::Rect viewport_; |
| 186 gfx::Rect clip_; |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 class FakeRendererGL : public GLRenderer { | 189 class FakeRendererGL : public GLRenderer { |
| 190 public: | 190 public: |
| 191 FakeRendererGL(RendererClient* client, | 191 FakeRendererGL(RendererClient* client, |
| 192 const LayerTreeSettings* settings, | 192 const LayerTreeSettings* settings, |
| 193 OutputSurface* output_surface, | 193 OutputSurface* output_surface, |
| 194 ResourceProvider* resource_provider) | 194 ResourceProvider* resource_provider) |
| 195 : GLRenderer(client, | 195 : GLRenderer(client, |
| 196 settings, | 196 settings, |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 | 1130 |
| 1131 AddRenderPassQuad(root_pass, child_pass); | 1131 AddRenderPassQuad(root_pass, child_pass); |
| 1132 AddRenderPassQuad(child_pass, grand_child_pass); | 1132 AddRenderPassQuad(child_pass, grand_child_pass); |
| 1133 | 1133 |
| 1134 renderer.DecideRenderPassAllocationsForFrame( | 1134 renderer.DecideRenderPassAllocationsForFrame( |
| 1135 *renderer_client.render_passes_in_draw_order()); | 1135 *renderer_client.render_passes_in_draw_order()); |
| 1136 renderer.DrawFrame( | 1136 renderer.DrawFrame( |
| 1137 renderer_client.render_passes_in_draw_order(), NULL, 1.f, true); | 1137 renderer_client.render_passes_in_draw_order(), NULL, 1.f, true); |
| 1138 } | 1138 } |
| 1139 | 1139 |
| 1140 class DiscardCheckingContext : public TestWebGraphicsContext3D { |
| 1141 public: |
| 1142 DiscardCheckingContext() : discarded_(0) { |
| 1143 set_have_post_sub_buffer(true); |
| 1144 set_have_discard_framebuffer(true); |
| 1145 } |
| 1146 |
| 1147 virtual void discardFramebufferEXT(WGC3Denum target, |
| 1148 WGC3Dsizei numAttachments, |
| 1149 const WGC3Denum* attachments) { |
| 1150 ++discarded_; |
| 1151 } |
| 1152 |
| 1153 int discarded() const { return discarded_; } |
| 1154 void reset() { discarded_ = 0; } |
| 1155 |
| 1156 private: |
| 1157 int discarded_; |
| 1158 }; |
| 1159 |
| 1140 class NonReshapableOutputSurface : public FakeOutputSurface { | 1160 class NonReshapableOutputSurface : public FakeOutputSurface { |
| 1141 public: | 1161 public: |
| 1142 explicit NonReshapableOutputSurface( | 1162 explicit NonReshapableOutputSurface( |
| 1143 scoped_ptr<TestWebGraphicsContext3D> context3d) | 1163 scoped_ptr<TestWebGraphicsContext3D> context3d) |
| 1144 : FakeOutputSurface( | 1164 : FakeOutputSurface(TestContextProvider::Create(context3d.Pass()), |
| 1145 TestContextProvider::Create(context3d.Pass()), | 1165 false) { |
| 1146 false) {} | 1166 surface_size_ = gfx::Size(500, 500); |
| 1147 virtual gfx::Size SurfaceSize() const OVERRIDE { return gfx::Size(500, 500); } | 1167 } |
| 1168 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE {} |
| 1169 void set_fixed_size(gfx::Size size) { surface_size_ = size; } |
| 1148 }; | 1170 }; |
| 1149 | 1171 |
| 1150 class OffsetViewportRendererClient : public FakeRendererClient { | 1172 TEST(GLRendererTest2, NoDiscardOnPartialUpdates) { |
| 1151 public: | 1173 scoped_ptr<DiscardCheckingContext> context_owned(new DiscardCheckingContext); |
| 1152 virtual gfx::Rect DeviceViewport() const OVERRIDE { | 1174 DiscardCheckingContext* context = context_owned.get(); |
| 1153 return gfx::Rect(10, 10, 100, 100); | 1175 |
| 1176 FakeOutputSurfaceClient output_surface_client; |
| 1177 scoped_ptr<NonReshapableOutputSurface> output_surface( |
| 1178 new NonReshapableOutputSurface( |
| 1179 context_owned.PassAs<TestWebGraphicsContext3D>())); |
| 1180 CHECK(output_surface->BindToClient(&output_surface_client)); |
| 1181 output_surface->set_fixed_size(gfx::Size(100, 100)); |
| 1182 |
| 1183 scoped_ptr<ResourceProvider> resource_provider( |
| 1184 ResourceProvider::Create(output_surface.get(), 0, false)); |
| 1185 |
| 1186 LayerTreeSettings settings; |
| 1187 settings.partial_swap_enabled = true; |
| 1188 FakeRendererClient renderer_client; |
| 1189 renderer_client.set_viewport(gfx::Rect(0, 0, 100, 100)); |
| 1190 renderer_client.set_clip(gfx::Rect(0, 0, 100, 100)); |
| 1191 FakeRendererGL renderer(&renderer_client, |
| 1192 &settings, |
| 1193 output_surface.get(), |
| 1194 resource_provider.get()); |
| 1195 EXPECT_TRUE(renderer.Initialize()); |
| 1196 EXPECT_TRUE(renderer.Capabilities().using_partial_swap); |
| 1197 |
| 1198 gfx::Rect viewport_rect(renderer_client.DeviceViewport()); |
| 1199 ScopedPtrVector<RenderPass>& render_passes = |
| 1200 *renderer_client.render_passes_in_draw_order(); |
| 1201 render_passes.clear(); |
| 1202 |
| 1203 { |
| 1204 // Partial frame, should not discard. |
| 1205 RenderPass::Id root_pass_id(1, 0); |
| 1206 TestRenderPass* root_pass = AddRenderPass( |
| 1207 &render_passes, root_pass_id, viewport_rect, gfx::Transform()); |
| 1208 AddQuad(root_pass, viewport_rect, SK_ColorGREEN); |
| 1209 root_pass->damage_rect = gfx::RectF(2.f, 2.f, 3.f, 3.f); |
| 1210 |
| 1211 renderer.DecideRenderPassAllocationsForFrame( |
| 1212 *renderer_client.render_passes_in_draw_order()); |
| 1213 renderer.DrawFrame( |
| 1214 renderer_client.render_passes_in_draw_order(), NULL, 1.f, true); |
| 1215 EXPECT_EQ(0, context->discarded()); |
| 1216 context->reset(); |
| 1154 } | 1217 } |
| 1155 }; | 1218 { |
| 1219 // Full frame, should discard. |
| 1220 RenderPass::Id root_pass_id(1, 0); |
| 1221 TestRenderPass* root_pass = AddRenderPass( |
| 1222 &render_passes, root_pass_id, viewport_rect, gfx::Transform()); |
| 1223 AddQuad(root_pass, viewport_rect, SK_ColorGREEN); |
| 1224 root_pass->damage_rect = gfx::RectF(root_pass->output_rect); |
| 1225 |
| 1226 renderer.DecideRenderPassAllocationsForFrame( |
| 1227 *renderer_client.render_passes_in_draw_order()); |
| 1228 renderer.DrawFrame( |
| 1229 renderer_client.render_passes_in_draw_order(), NULL, 1.f, true); |
| 1230 EXPECT_EQ(1, context->discarded()); |
| 1231 context->reset(); |
| 1232 } |
| 1233 { |
| 1234 // Partial frame, disallow partial swap, should discard. |
| 1235 RenderPass::Id root_pass_id(1, 0); |
| 1236 TestRenderPass* root_pass = AddRenderPass( |
| 1237 &render_passes, root_pass_id, viewport_rect, gfx::Transform()); |
| 1238 AddQuad(root_pass, viewport_rect, SK_ColorGREEN); |
| 1239 root_pass->damage_rect = gfx::RectF(2.f, 2.f, 3.f, 3.f); |
| 1240 |
| 1241 renderer.DecideRenderPassAllocationsForFrame( |
| 1242 *renderer_client.render_passes_in_draw_order()); |
| 1243 renderer.DrawFrame( |
| 1244 renderer_client.render_passes_in_draw_order(), NULL, 1.f, false); |
| 1245 EXPECT_EQ(1, context->discarded()); |
| 1246 context->reset(); |
| 1247 } |
| 1248 { |
| 1249 // Full frame, external scissor is set, should not discard. |
| 1250 output_surface->set_has_external_stencil_test(true); |
| 1251 RenderPass::Id root_pass_id(1, 0); |
| 1252 TestRenderPass* root_pass = AddRenderPass( |
| 1253 &render_passes, root_pass_id, viewport_rect, gfx::Transform()); |
| 1254 AddQuad(root_pass, viewport_rect, SK_ColorGREEN); |
| 1255 root_pass->damage_rect = gfx::RectF(root_pass->output_rect); |
| 1256 root_pass->has_transparent_background = false; |
| 1257 |
| 1258 renderer.DecideRenderPassAllocationsForFrame( |
| 1259 *renderer_client.render_passes_in_draw_order()); |
| 1260 renderer.DrawFrame( |
| 1261 renderer_client.render_passes_in_draw_order(), NULL, 1.f, true); |
| 1262 EXPECT_EQ(0, context->discarded()); |
| 1263 context->reset(); |
| 1264 output_surface->set_has_external_stencil_test(false); |
| 1265 } |
| 1266 { |
| 1267 // Full frame, clipped, should not discard. |
| 1268 renderer_client.set_clip(gfx::Rect(10, 10, 10, 10)); |
| 1269 RenderPass::Id root_pass_id(1, 0); |
| 1270 TestRenderPass* root_pass = AddRenderPass( |
| 1271 &render_passes, root_pass_id, viewport_rect, gfx::Transform()); |
| 1272 AddQuad(root_pass, viewport_rect, SK_ColorGREEN); |
| 1273 root_pass->damage_rect = gfx::RectF(root_pass->output_rect); |
| 1274 |
| 1275 renderer.DecideRenderPassAllocationsForFrame( |
| 1276 *renderer_client.render_passes_in_draw_order()); |
| 1277 renderer.DrawFrame( |
| 1278 renderer_client.render_passes_in_draw_order(), NULL, 1.f, true); |
| 1279 EXPECT_EQ(0, context->discarded()); |
| 1280 context->reset(); |
| 1281 } |
| 1282 { |
| 1283 // Full frame, doesn't cover the surface, should not discard. |
| 1284 renderer_client.set_viewport(gfx::Rect(10, 10, 10, 10)); |
| 1285 viewport_rect = renderer_client.DeviceViewport(); |
| 1286 RenderPass::Id root_pass_id(1, 0); |
| 1287 TestRenderPass* root_pass = AddRenderPass( |
| 1288 &render_passes, root_pass_id, viewport_rect, gfx::Transform()); |
| 1289 AddQuad(root_pass, viewport_rect, SK_ColorGREEN); |
| 1290 root_pass->damage_rect = gfx::RectF(root_pass->output_rect); |
| 1291 |
| 1292 renderer.DecideRenderPassAllocationsForFrame( |
| 1293 *renderer_client.render_passes_in_draw_order()); |
| 1294 renderer.DrawFrame( |
| 1295 renderer_client.render_passes_in_draw_order(), NULL, 1.f, true); |
| 1296 EXPECT_EQ(0, context->discarded()); |
| 1297 context->reset(); |
| 1298 } |
| 1299 { |
| 1300 // Full frame, doesn't cover the surface (no offset), should not discard. |
| 1301 renderer_client.set_viewport(gfx::Rect(0, 0, 50, 50)); |
| 1302 renderer_client.set_clip(gfx::Rect(0, 0, 100, 100)); |
| 1303 viewport_rect = renderer_client.DeviceViewport(); |
| 1304 RenderPass::Id root_pass_id(1, 0); |
| 1305 TestRenderPass* root_pass = AddRenderPass( |
| 1306 &render_passes, root_pass_id, viewport_rect, gfx::Transform()); |
| 1307 AddQuad(root_pass, viewport_rect, SK_ColorGREEN); |
| 1308 root_pass->damage_rect = gfx::RectF(root_pass->output_rect); |
| 1309 |
| 1310 renderer.DecideRenderPassAllocationsForFrame( |
| 1311 *renderer_client.render_passes_in_draw_order()); |
| 1312 renderer.DrawFrame( |
| 1313 renderer_client.render_passes_in_draw_order(), NULL, 1.f, true); |
| 1314 EXPECT_EQ(0, context->discarded()); |
| 1315 context->reset(); |
| 1316 } |
| 1317 } |
| 1156 | 1318 |
| 1157 class FlippedScissorAndViewportContext : public TestWebGraphicsContext3D { | 1319 class FlippedScissorAndViewportContext : public TestWebGraphicsContext3D { |
| 1158 public: | 1320 public: |
| 1159 FlippedScissorAndViewportContext() | 1321 FlippedScissorAndViewportContext() |
| 1160 : did_call_viewport_(false), did_call_scissor_(false) {} | 1322 : did_call_viewport_(false), did_call_scissor_(false) {} |
| 1161 virtual ~FlippedScissorAndViewportContext() { | 1323 virtual ~FlippedScissorAndViewportContext() { |
| 1162 EXPECT_TRUE(did_call_viewport_); | 1324 EXPECT_TRUE(did_call_viewport_); |
| 1163 EXPECT_TRUE(did_call_scissor_); | 1325 EXPECT_TRUE(did_call_scissor_); |
| 1164 } | 1326 } |
| 1165 | 1327 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1194 | 1356 |
| 1195 FakeOutputSurfaceClient output_surface_client; | 1357 FakeOutputSurfaceClient output_surface_client; |
| 1196 scoped_ptr<OutputSurface> output_surface(new NonReshapableOutputSurface( | 1358 scoped_ptr<OutputSurface> output_surface(new NonReshapableOutputSurface( |
| 1197 context_owned.PassAs<TestWebGraphicsContext3D>())); | 1359 context_owned.PassAs<TestWebGraphicsContext3D>())); |
| 1198 CHECK(output_surface->BindToClient(&output_surface_client)); | 1360 CHECK(output_surface->BindToClient(&output_surface_client)); |
| 1199 | 1361 |
| 1200 scoped_ptr<ResourceProvider> resource_provider( | 1362 scoped_ptr<ResourceProvider> resource_provider( |
| 1201 ResourceProvider::Create(output_surface.get(), 0, false)); | 1363 ResourceProvider::Create(output_surface.get(), 0, false)); |
| 1202 | 1364 |
| 1203 LayerTreeSettings settings; | 1365 LayerTreeSettings settings; |
| 1204 OffsetViewportRendererClient renderer_client; | 1366 FakeRendererClient renderer_client; |
| 1367 renderer_client.set_viewport(gfx::Rect(10, 10, 100, 100)); |
| 1368 renderer_client.set_clip(gfx::Rect(10, 10, 100, 100)); |
| 1205 FakeRendererGL renderer(&renderer_client, | 1369 FakeRendererGL renderer(&renderer_client, |
| 1206 &settings, | 1370 &settings, |
| 1207 output_surface.get(), | 1371 output_surface.get(), |
| 1208 resource_provider.get()); | 1372 resource_provider.get()); |
| 1209 EXPECT_TRUE(renderer.Initialize()); | 1373 EXPECT_TRUE(renderer.Initialize()); |
| 1210 EXPECT_FALSE(renderer.Capabilities().using_partial_swap); | 1374 EXPECT_FALSE(renderer.Capabilities().using_partial_swap); |
| 1211 | 1375 |
| 1212 gfx::Rect viewport_rect(renderer_client.DeviceViewport().size()); | 1376 gfx::Rect viewport_rect(renderer_client.DeviceViewport().size()); |
| 1213 gfx::Rect quad_rect = gfx::Rect(20, 20, 20, 20); | 1377 gfx::Rect quad_rect = gfx::Rect(20, 20, 20, 20); |
| 1214 ScopedPtrVector<RenderPass>& render_passes = | 1378 ScopedPtrVector<RenderPass>& render_passes = |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1599 | 1763 |
| 1600 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); | 1764 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); |
| 1601 renderer_->SwapBuffers(); | 1765 renderer_->SwapBuffers(); |
| 1602 } | 1766 } |
| 1603 | 1767 |
| 1604 TEST_F(MockOutputSurfaceTest, DrawFrameAndResizeAndSwap) { | 1768 TEST_F(MockOutputSurfaceTest, DrawFrameAndResizeAndSwap) { |
| 1605 DrawFrame(1.f); | 1769 DrawFrame(1.f); |
| 1606 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); | 1770 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); |
| 1607 renderer_->SwapBuffers(); | 1771 renderer_->SwapBuffers(); |
| 1608 | 1772 |
| 1609 set_viewport(gfx::Size(2, 2)); | 1773 set_viewport(gfx::Rect(0, 0, 2, 2)); |
| 1610 renderer_->ViewportChanged(); | 1774 renderer_->ViewportChanged(); |
| 1611 | 1775 |
| 1612 DrawFrame(2.f); | 1776 DrawFrame(2.f); |
| 1613 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); | 1777 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); |
| 1614 renderer_->SwapBuffers(); | 1778 renderer_->SwapBuffers(); |
| 1615 | 1779 |
| 1616 DrawFrame(2.f); | 1780 DrawFrame(2.f); |
| 1617 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); | 1781 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); |
| 1618 renderer_->SwapBuffers(); | 1782 renderer_->SwapBuffers(); |
| 1619 | 1783 |
| 1620 set_viewport(gfx::Size(1, 1)); | 1784 set_viewport(gfx::Rect(0, 0, 1, 1)); |
| 1621 renderer_->ViewportChanged(); | 1785 renderer_->ViewportChanged(); |
| 1622 | 1786 |
| 1623 DrawFrame(1.f); | 1787 DrawFrame(1.f); |
| 1624 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); | 1788 EXPECT_CALL(output_surface_, SwapBuffers(_)).Times(1); |
| 1625 renderer_->SwapBuffers(); | 1789 renderer_->SwapBuffers(); |
| 1626 } | 1790 } |
| 1627 | 1791 |
| 1628 class GLRendererTestSyncPoint : public GLRendererPixelTest { | 1792 class GLRendererTestSyncPoint : public GLRendererPixelTest { |
| 1629 protected: | 1793 protected: |
| 1630 static void SyncPointCallback(int* callback_count) { | 1794 static void SyncPointCallback(int* callback_count) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 base::MessageLoop::current()->Run(); | 1856 base::MessageLoop::current()->Run(); |
| 1693 | 1857 |
| 1694 // The sync point should have happened. | 1858 // The sync point should have happened. |
| 1695 EXPECT_EQ(1, sync_point_callback_count); | 1859 EXPECT_EQ(1, sync_point_callback_count); |
| 1696 EXPECT_EQ(1, other_callback_count); | 1860 EXPECT_EQ(1, other_callback_count); |
| 1697 } | 1861 } |
| 1698 #endif // OS_ANDROID | 1862 #endif // OS_ANDROID |
| 1699 | 1863 |
| 1700 } // namespace | 1864 } // namespace |
| 1701 } // namespace cc | 1865 } // namespace cc |
| OLD | NEW |