diff options
Diffstat (limited to 'cc/test')
-rw-r--r-- | cc/test/animation_test_common.cc | 54 | ||||
-rw-r--r-- | cc/test/cc_test_suite.cc | 2 | ||||
-rw-r--r-- | cc/test/fake_content_layer_client.h | 2 | ||||
-rw-r--r-- | cc/test/fake_output_surface.cc | 2 | ||||
-rw-r--r-- | cc/test/fake_output_surface.h | 4 | ||||
-rw-r--r-- | cc/test/geometry_test_utils.h | 8 | ||||
-rw-r--r-- | cc/test/layer_test_common.cc | 9 | ||||
-rw-r--r-- | cc/test/layer_test_common.h | 2 | ||||
-rw-r--r-- | cc/test/layer_tree_json_parser.cc | 2 | ||||
-rw-r--r-- | cc/test/layer_tree_json_parser_unittest.cc | 2 | ||||
-rw-r--r-- | cc/test/layer_tree_pixel_test.cc | 5 | ||||
-rw-r--r-- | cc/test/paths.cc | 4 | ||||
-rw-r--r-- | cc/test/paths.h | 22 | ||||
-rw-r--r-- | cc/test/pixel_test.cc | 2 | ||||
-rw-r--r-- | cc/test/pixel_test_output_surface.cc | 2 | ||||
-rw-r--r-- | cc/test/pixel_test_output_surface.h | 2 | ||||
-rw-r--r-- | cc/test/render_pass_test_common.cc | 131 | ||||
-rw-r--r-- | cc/test/scheduler_test_common.h | 10 | ||||
-rw-r--r-- | cc/test/solid_color_content_layer_client.h | 2 | ||||
-rw-r--r-- | cc/test/test_context_provider.h | 2 |
20 files changed, 125 insertions, 144 deletions
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc index e6c6773..01e33bb 100644 --- a/cc/test/animation_test_common.cc +++ b/cc/test/animation_test_common.cc @@ -36,9 +36,8 @@ int AddOpacityTransition(Target* target, func = EaseTimingFunction::Create(); if (duration > 0.0) curve->AddKeyframe(FloatKeyframe::Create(0.0, start_opacity, func.Pass())); - curve->AddKeyframe(FloatKeyframe::Create(duration, - end_opacity, - scoped_ptr<cc::TimingFunction>())); + curve->AddKeyframe(FloatKeyframe::Create( + duration, end_opacity, scoped_ptr<TimingFunction>())); int id = AnimationIdProvider::NextAnimationId(); @@ -65,17 +64,13 @@ int AddAnimatedTransform(Target* target, TransformOperations start_operations; start_operations.AppendTranslate(delta_x, delta_y, 0.0); curve->AddKeyframe(TransformKeyframe::Create( - 0.0, - start_operations, - scoped_ptr<cc::TimingFunction>())); + 0.0, start_operations, scoped_ptr<TimingFunction>())); } TransformOperations operations; operations.AppendTranslate(delta_x, delta_y, 0.0); curve->AddKeyframe(TransformKeyframe::Create( - duration, - operations, - scoped_ptr<cc::TimingFunction>())); + duration, operations, scoped_ptr<TimingFunction>())); int id = AnimationIdProvider::NextAnimationId(); @@ -103,13 +98,13 @@ int AddAnimatedFilter(Target* target, start_filters.Append( FilterOperation::CreateBrightnessFilter(start_brightness)); curve->AddKeyframe(FilterKeyframe::Create( - 0.0, start_filters, scoped_ptr<cc::TimingFunction>())); + 0.0, start_filters, scoped_ptr<TimingFunction>())); } FilterOperations filters; filters.Append(FilterOperation::CreateBrightnessFilter(end_brightness)); - curve->AddKeyframe(FilterKeyframe::Create( - duration, filters, scoped_ptr<cc::TimingFunction>())); + curve->AddKeyframe( + FilterKeyframe::Create(duration, filters, scoped_ptr<TimingFunction>())); int id = AnimationIdProvider::NextAnimationId(); @@ -140,9 +135,8 @@ float FakeFloatAnimationCurve::GetValue(double now) const { return 0.0f; } -scoped_ptr<cc::AnimationCurve> FakeFloatAnimationCurve::Clone() const { - return make_scoped_ptr( - new FakeFloatAnimationCurve).PassAs<cc::AnimationCurve>(); +scoped_ptr<AnimationCurve> FakeFloatAnimationCurve::Clone() const { + return make_scoped_ptr(new FakeFloatAnimationCurve).PassAs<AnimationCurve>(); } FakeTransformTransition::FakeTransformTransition(double duration) @@ -163,9 +157,9 @@ bool FakeTransformTransition::AnimatedBoundsForBox(const gfx::BoxF& box, return false; } -scoped_ptr<cc::AnimationCurve> FakeTransformTransition::Clone() const { - return make_scoped_ptr( - new FakeTransformTransition(*this)).PassAs<cc::AnimationCurve>(); +scoped_ptr<AnimationCurve> FakeTransformTransition::Clone() const { + return make_scoped_ptr(new FakeTransformTransition(*this)) + .PassAs<AnimationCurve>(); } @@ -227,12 +221,12 @@ gfx::Vector2dF FakeLayerAnimationValueProvider::ScrollOffsetForAnimation() return scroll_offset_; } -scoped_ptr<cc::AnimationCurve> FakeFloatTransition::Clone() const { - return make_scoped_ptr( - new FakeFloatTransition(*this)).PassAs<cc::AnimationCurve>(); +scoped_ptr<AnimationCurve> FakeFloatTransition::Clone() const { + return make_scoped_ptr(new FakeFloatTransition(*this)) + .PassAs<AnimationCurve>(); } -int AddOpacityTransitionToController(cc::LayerAnimationController* controller, +int AddOpacityTransitionToController(LayerAnimationController* controller, double duration, float start_opacity, float end_opacity, @@ -244,7 +238,7 @@ int AddOpacityTransitionToController(cc::LayerAnimationController* controller, use_timing_function); } -int AddAnimatedTransformToController(cc::LayerAnimationController* controller, +int AddAnimatedTransformToController(LayerAnimationController* controller, double duration, int delta_x, int delta_y) { @@ -254,7 +248,7 @@ int AddAnimatedTransformToController(cc::LayerAnimationController* controller, delta_y); } -int AddAnimatedFilterToController(cc::LayerAnimationController* controller, +int AddAnimatedFilterToController(LayerAnimationController* controller, double duration, float start_brightness, float end_brightness) { @@ -262,7 +256,7 @@ int AddAnimatedFilterToController(cc::LayerAnimationController* controller, controller, duration, start_brightness, end_brightness); } -int AddOpacityTransitionToLayer(cc::Layer* layer, +int AddOpacityTransitionToLayer(Layer* layer, double duration, float start_opacity, float end_opacity, @@ -274,7 +268,7 @@ int AddOpacityTransitionToLayer(cc::Layer* layer, use_timing_function); } -int AddOpacityTransitionToLayer(cc::LayerImpl* layer, +int AddOpacityTransitionToLayer(LayerImpl* layer, double duration, float start_opacity, float end_opacity, @@ -286,14 +280,14 @@ int AddOpacityTransitionToLayer(cc::LayerImpl* layer, use_timing_function); } -int AddAnimatedTransformToLayer(cc::Layer* layer, +int AddAnimatedTransformToLayer(Layer* layer, double duration, int delta_x, int delta_y) { return AddAnimatedTransform(layer, duration, delta_x, delta_y); } -int AddAnimatedTransformToLayer(cc::LayerImpl* layer, +int AddAnimatedTransformToLayer(LayerImpl* layer, double duration, int delta_x, int delta_y) { @@ -303,14 +297,14 @@ int AddAnimatedTransformToLayer(cc::LayerImpl* layer, delta_y); } -int AddAnimatedFilterToLayer(cc::Layer* layer, +int AddAnimatedFilterToLayer(Layer* layer, double duration, float start_brightness, float end_brightness) { return AddAnimatedFilter(layer, duration, start_brightness, end_brightness); } -int AddAnimatedFilterToLayer(cc::LayerImpl* layer, +int AddAnimatedFilterToLayer(LayerImpl* layer, double duration, float start_brightness, float end_brightness) { diff --git a/cc/test/cc_test_suite.cc b/cc/test/cc_test_suite.cc index 4fa6565..8b3228a 100644 --- a/cc/test/cc_test_suite.cc +++ b/cc/test/cc_test_suite.cc @@ -21,7 +21,7 @@ CCTestSuite::~CCTestSuite() {} void CCTestSuite::Initialize() { base::TestSuite::Initialize(); - RegisterPathProvider(); + CCPaths::RegisterPathProvider(); message_loop_.reset(new base::MessageLoop); diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h index 6afa5b6..fbbebd8 100644 --- a/cc/test/fake_content_layer_client.h +++ b/cc/test/fake_content_layer_client.h @@ -16,7 +16,7 @@ namespace cc { -class FakeContentLayerClient : public cc::ContentLayerClient { +class FakeContentLayerClient : public ContentLayerClient { public: struct BitmapData { SkBitmap bitmap; diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc index a2d67f7..e72253c 100644 --- a/cc/test/fake_output_surface.cc +++ b/cc/test/fake_output_surface.cc @@ -144,7 +144,7 @@ bool FakeOutputSurface::HasExternalStencilTest() const { } void FakeOutputSurface::SetMemoryPolicyToSetAtBind( - scoped_ptr<cc::ManagedMemoryPolicy> memory_policy_to_set_at_bind) { + scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) { memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind); } diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h index 0a85f4d..c458dc6 100644 --- a/cc/test/fake_output_surface.h +++ b/cc/test/fake_output_surface.h @@ -124,7 +124,7 @@ class FakeOutputSurface : public OutputSurface { } void SetMemoryPolicyToSetAtBind( - scoped_ptr<cc::ManagedMemoryPolicy> memory_policy_to_set_at_bind); + scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind); protected: FakeOutputSurface( @@ -150,7 +150,7 @@ class FakeOutputSurface : public OutputSurface { bool has_external_stencil_test_; TransferableResourceArray resources_held_by_parent_; base::WeakPtrFactory<FakeOutputSurface> fake_weak_ptr_factory_; - scoped_ptr<cc::ManagedMemoryPolicy> memory_policy_to_set_at_bind_; + scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; }; static inline scoped_ptr<OutputSurface> CreateFakeOutputSurface() { diff --git a/cc/test/geometry_test_utils.h b/cc/test/geometry_test_utils.h index 12ca18d..d8829e0 100644 --- a/cc/test/geometry_test_utils.h +++ b/cc/test/geometry_test_utils.h @@ -84,10 +84,10 @@ void ExpectTransformationMatrixEq(const gfx::Transform& expected, const gfx::Transform& actual); #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \ -do { \ - SCOPED_TRACE(""); \ - cc::ExpectTransformationMatrixEq(expected, actual); \ -} while (false) + do { \ + SCOPED_TRACE(""); \ + ExpectTransformationMatrixEq(expected, actual); \ + } while (false) // Should be used in test code only, for convenience. Production code should use // the gfx::Transform::GetInverse() API. diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc index fcd09d4..3ccd0a4 100644 --- a/cc/test/layer_test_common.cc +++ b/cc/test/layer_test_common.cc @@ -32,15 +32,14 @@ static bool CanRectFBeSafelyRoundedToRect(gfx::RectF r) { return false; } -void LayerTestCommon::VerifyQuadsExactlyCoverRect(const cc::QuadList& quads, +void LayerTestCommon::VerifyQuadsExactlyCoverRect(const QuadList& quads, gfx::Rect rect) { - cc::Region remaining = rect; + Region remaining = rect; for (size_t i = 0; i < quads.size(); ++i) { - cc::DrawQuad* quad = quads[i]; + DrawQuad* quad = quads[i]; gfx::RectF quad_rectf = - cc::MathUtil::MapClippedRect(quad->quadTransform(), - gfx::RectF(quad->rect)); + MathUtil::MapClippedRect(quad->quadTransform(), gfx::RectF(quad->rect)); // Before testing for exact coverage in the integer world, assert that // rounding will not round the rect incorrectly. diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h index 0021398..cc7a18e 100644 --- a/cc/test/layer_test_common.h +++ b/cc/test/layer_test_common.h @@ -28,7 +28,7 @@ class LayerTestCommon { public: static const char* quad_string; - static void VerifyQuadsExactlyCoverRect(const cc::QuadList& quads, + static void VerifyQuadsExactlyCoverRect(const QuadList& quads, gfx::Rect rect); }; diff --git a/cc/test/layer_tree_json_parser.cc b/cc/test/layer_tree_json_parser.cc index 9a1b198..d120067 100644 --- a/cc/test/layer_tree_json_parser.cc +++ b/cc/test/layer_tree_json_parser.cc @@ -110,7 +110,7 @@ scoped_refptr<Layer> ParseTreeFromValue(base::Value* val, if (dict->HasKey("TouchRegion")) { success &= dict->GetList("TouchRegion", &list); - cc::Region touch_region; + Region touch_region; for (size_t i = 0; i < list->GetSize(); ) { int rect_x, rect_y, rect_width, rect_height; success &= list->GetInteger(i++, &rect_x); diff --git a/cc/test/layer_tree_json_parser_unittest.cc b/cc/test/layer_tree_json_parser_unittest.cc index 4261a71..3fd6725 100644 --- a/cc/test/layer_tree_json_parser_unittest.cc +++ b/cc/test/layer_tree_json_parser_unittest.cc @@ -99,7 +99,7 @@ TEST_F(LayerTreeJsonParserSanityCheck, EventHandlerRegions) { root_impl->SetBounds(gfx::Size(100, 100)); touch_layer->SetBounds(gfx::Size(50, 50)); - cc::Region touch_region; + Region touch_region; touch_region.Union(gfx::Rect(10, 10, 20, 30)); touch_region.Union(gfx::Rect(40, 10, 20, 20)); touch_layer->SetTouchEventHandlerRegion(touch_region); diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc index 5388cba..e41a038 100644 --- a/cc/test/layer_tree_pixel_test.cc +++ b/cc/test/layer_tree_pixel_test.cc @@ -65,8 +65,7 @@ scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface( return output_surface.PassAs<OutputSurface>(); } -scoped_refptr<cc::ContextProvider> -LayerTreePixelTest::OffscreenContextProvider() { +scoped_refptr<ContextProvider> LayerTreePixelTest::OffscreenContextProvider() { scoped_refptr<webkit::gpu::ContextProviderInProcess> provider = webkit::gpu::ContextProviderInProcess::CreateOffscreen(); CHECK(provider.get()); @@ -108,7 +107,7 @@ void LayerTreePixelTest::BeginTest() { void LayerTreePixelTest::AfterTest() { base::FilePath test_data_dir; - EXPECT_TRUE(PathService::Get(cc::DIR_TEST_DATA, &test_data_dir)); + EXPECT_TRUE(PathService::Get(CCPaths::DIR_TEST_DATA, &test_data_dir)); base::FilePath ref_file_path = test_data_dir.Append(ref_file_); CommandLine* cmd = CommandLine::ForCurrentProcess(); diff --git a/cc/test/paths.cc b/cc/test/paths.cc index a54d551..f3ede27 100644 --- a/cc/test/paths.cc +++ b/cc/test/paths.cc @@ -16,7 +16,7 @@ bool PathProvider(int key, base::FilePath* result) { // The following are only valid in the development environment, and // will fail if executed from an installed executable (because the // generated path won't exist). - case DIR_TEST_DATA: + case CCPaths::DIR_TEST_DATA: if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) return false; cur = cur.Append(FILE_PATH_LITERAL("cc")); @@ -35,7 +35,7 @@ bool PathProvider(int key, base::FilePath* result) { // This cannot be done as a static initializer sadly since Visual Studio will // eliminate this object file if there is no direct entry point into it. -void RegisterPathProvider() { +void CCPaths::RegisterPathProvider() { PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); } diff --git a/cc/test/paths.h b/cc/test/paths.h index 07b7a64..f48177e 100644 --- a/cc/test/paths.h +++ b/cc/test/paths.h @@ -7,18 +7,20 @@ namespace cc { -enum { - PATH_START = 5000, - - // Valid only in development and testing environments. - DIR_TEST_DATA, - - PATH_END +class CCPaths { + public: + enum { + PATH_START = 5000, + + // Valid only in development and testing environments. + DIR_TEST_DATA, + PATH_END + }; + + // Call once to register the provider for the path keys defined above. + static void RegisterPathProvider(); }; -// Call once to register the provider for the path keys defined above. -void RegisterPathProvider(); - } // namespace cc #endif // CC_TEST_PATHS_H_ diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc index 414a325..78cdd69 100644 --- a/cc/test/pixel_test.cc +++ b/cc/test/pixel_test.cc @@ -104,7 +104,7 @@ void PixelTest::ReadbackResult(base::Closure quit_run_loop, bool PixelTest::PixelsMatchReference(const base::FilePath& ref_file, const PixelComparator& comparator) { base::FilePath test_data_dir; - if (!PathService::Get(cc::DIR_TEST_DATA, &test_data_dir)) + if (!PathService::Get(CCPaths::DIR_TEST_DATA, &test_data_dir)) return false; // If this is false, we didn't set up a readback on a render pass. diff --git a/cc/test/pixel_test_output_surface.cc b/cc/test/pixel_test_output_surface.cc index 1ea89e2..e3f62bd 100644 --- a/cc/test/pixel_test_output_surface.cc +++ b/cc/test/pixel_test_output_surface.cc @@ -14,7 +14,7 @@ PixelTestOutputSurface::PixelTestOutputSurface( : OutputSurface(context_provider), external_stencil_test_(false) {} PixelTestOutputSurface::PixelTestOutputSurface( - scoped_ptr<cc::SoftwareOutputDevice> software_device) + scoped_ptr<SoftwareOutputDevice> software_device) : OutputSurface(software_device.Pass()), external_stencil_test_(false) {} void PixelTestOutputSurface::Reshape(gfx::Size size, float scale_factor) { diff --git a/cc/test/pixel_test_output_surface.h b/cc/test/pixel_test_output_surface.h index 2aca4f2..2a4573a 100644 --- a/cc/test/pixel_test_output_surface.h +++ b/cc/test/pixel_test_output_surface.h @@ -14,7 +14,7 @@ class PixelTestOutputSurface : public OutputSurface { explicit PixelTestOutputSurface( scoped_refptr<ContextProvider> context_provider); explicit PixelTestOutputSurface( - scoped_ptr<cc::SoftwareOutputDevice> software_device); + scoped_ptr<SoftwareOutputDevice> software_device); virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; virtual bool HasExternalStencilTest() const OVERRIDE; diff --git a/cc/test/render_pass_test_common.cc b/cc/test/render_pass_test_common.cc index 4b69a7e..72467dd 100644 --- a/cc/test/render_pass_test_common.cc +++ b/cc/test/render_pass_test_common.cc @@ -19,12 +19,11 @@ namespace cc { -void TestRenderPass::AppendQuad(scoped_ptr<cc::DrawQuad> quad) { +void TestRenderPass::AppendQuad(scoped_ptr<DrawQuad> quad) { quad_list.push_back(quad.Pass()); } -void TestRenderPass::AppendSharedQuadState( - scoped_ptr<cc::SharedQuadState> state) { +void TestRenderPass::AppendSharedQuadState(scoped_ptr<SharedQuadState> state) { shared_quad_state_list.push_back(state.Pass()); } @@ -34,57 +33,50 @@ void TestRenderPass::AppendOneOfEveryQuadType( gfx::Rect rect(0, 0, 100, 100); gfx::Rect opaque_rect(10, 10, 80, 80); const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f}; - cc::ResourceProvider::ResourceId resource1 = - resource_provider->CreateResource( - gfx::Size(45, 5), - GL_CLAMP_TO_EDGE, - ResourceProvider::TextureUsageAny, - resource_provider->best_texture_format()); + ResourceProvider::ResourceId resource1 = resource_provider->CreateResource( + gfx::Size(45, 5), + GL_CLAMP_TO_EDGE, + ResourceProvider::TextureUsageAny, + resource_provider->best_texture_format()); resource_provider->AllocateForTesting(resource1); - cc::ResourceProvider::ResourceId resource2 = - resource_provider->CreateResource( - gfx::Size(346, 61), - GL_CLAMP_TO_EDGE, - ResourceProvider::TextureUsageAny, - resource_provider->best_texture_format()); + ResourceProvider::ResourceId resource2 = resource_provider->CreateResource( + gfx::Size(346, 61), + GL_CLAMP_TO_EDGE, + ResourceProvider::TextureUsageAny, + resource_provider->best_texture_format()); resource_provider->AllocateForTesting(resource2); - cc::ResourceProvider::ResourceId resource3 = - resource_provider->CreateResource( - gfx::Size(12, 134), - GL_CLAMP_TO_EDGE, - ResourceProvider::TextureUsageAny, - resource_provider->best_texture_format()); + ResourceProvider::ResourceId resource3 = resource_provider->CreateResource( + gfx::Size(12, 134), + GL_CLAMP_TO_EDGE, + ResourceProvider::TextureUsageAny, + resource_provider->best_texture_format()); resource_provider->AllocateForTesting(resource3); - cc::ResourceProvider::ResourceId resource4 = - resource_provider->CreateResource( - gfx::Size(56, 12), - GL_CLAMP_TO_EDGE, - ResourceProvider::TextureUsageAny, - resource_provider->best_texture_format()); + ResourceProvider::ResourceId resource4 = resource_provider->CreateResource( + gfx::Size(56, 12), + GL_CLAMP_TO_EDGE, + ResourceProvider::TextureUsageAny, + resource_provider->best_texture_format()); resource_provider->AllocateForTesting(resource4); - cc::ResourceProvider::ResourceId resource5 = - resource_provider->CreateResource( - gfx::Size(73, 26), - GL_CLAMP_TO_EDGE, - ResourceProvider::TextureUsageAny, - resource_provider->best_texture_format()); + ResourceProvider::ResourceId resource5 = resource_provider->CreateResource( + gfx::Size(73, 26), + GL_CLAMP_TO_EDGE, + ResourceProvider::TextureUsageAny, + resource_provider->best_texture_format()); resource_provider->AllocateForTesting(resource5); - cc::ResourceProvider::ResourceId resource6 = - resource_provider->CreateResource( - gfx::Size(64, 92), - GL_CLAMP_TO_EDGE, - ResourceProvider::TextureUsageAny, - resource_provider->best_texture_format()); + ResourceProvider::ResourceId resource6 = resource_provider->CreateResource( + gfx::Size(64, 92), + GL_CLAMP_TO_EDGE, + ResourceProvider::TextureUsageAny, + resource_provider->best_texture_format()); resource_provider->AllocateForTesting(resource6); - cc::ResourceProvider::ResourceId resource7 = - resource_provider->CreateResource( - gfx::Size(9, 14), - GL_CLAMP_TO_EDGE, - ResourceProvider::TextureUsageAny, - resource_provider->best_texture_format()); + ResourceProvider::ResourceId resource7 = resource_provider->CreateResource( + gfx::Size(9, 14), + GL_CLAMP_TO_EDGE, + ResourceProvider::TextureUsageAny, + resource_provider->best_texture_format()); resource_provider->AllocateForTesting(resource7); - scoped_ptr<cc::SharedQuadState> shared_state = cc::SharedQuadState::Create(); + scoped_ptr<SharedQuadState> shared_state = SharedQuadState::Create(); shared_state->SetAll(gfx::Transform(), rect.size(), rect, @@ -93,34 +85,33 @@ void TestRenderPass::AppendOneOfEveryQuadType( 1, SkXfermode::kSrcOver_Mode); - scoped_ptr<cc::CheckerboardDrawQuad> checkerboard_quad = - cc::CheckerboardDrawQuad::Create(); + scoped_ptr<CheckerboardDrawQuad> checkerboard_quad = + CheckerboardDrawQuad::Create(); checkerboard_quad->SetNew(shared_state.get(), rect, SK_ColorRED); AppendQuad(checkerboard_quad.PassAs<DrawQuad>()); - scoped_ptr<cc::DebugBorderDrawQuad> debug_border_quad = - cc::DebugBorderDrawQuad::Create(); + scoped_ptr<DebugBorderDrawQuad> debug_border_quad = + DebugBorderDrawQuad::Create(); debug_border_quad->SetNew(shared_state.get(), rect, SK_ColorRED, 1); AppendQuad(debug_border_quad.PassAs<DrawQuad>()); - scoped_ptr<cc::IOSurfaceDrawQuad> io_surface_quad = - cc::IOSurfaceDrawQuad::Create(); + scoped_ptr<IOSurfaceDrawQuad> io_surface_quad = IOSurfaceDrawQuad::Create(); io_surface_quad->SetNew(shared_state.get(), rect, opaque_rect, gfx::Size(50, 50), resource7, - cc::IOSurfaceDrawQuad::FLIPPED); + IOSurfaceDrawQuad::FLIPPED); AppendQuad(io_surface_quad.PassAs<DrawQuad>()); if (child_pass.layer_id) { - scoped_ptr<cc::RenderPassDrawQuad> render_pass_quad = - cc::RenderPassDrawQuad::Create(); + scoped_ptr<RenderPassDrawQuad> render_pass_quad = + RenderPassDrawQuad::Create(); render_pass_quad->SetNew(shared_state.get(), rect, child_pass, @@ -132,8 +123,8 @@ void TestRenderPass::AppendOneOfEveryQuadType( FilterOperations()); AppendQuad(render_pass_quad.PassAs<DrawQuad>()); - scoped_ptr<cc::RenderPassDrawQuad> render_pass_replica_quad = - cc::RenderPassDrawQuad::Create(); + scoped_ptr<RenderPassDrawQuad> render_pass_replica_quad = + RenderPassDrawQuad::Create(); render_pass_replica_quad->SetNew(shared_state.get(), rect, child_pass, @@ -146,16 +137,16 @@ void TestRenderPass::AppendOneOfEveryQuadType( AppendQuad(render_pass_replica_quad.PassAs<DrawQuad>()); } - scoped_ptr<cc::SolidColorDrawQuad> solid_color_quad = - cc::SolidColorDrawQuad::Create(); + scoped_ptr<SolidColorDrawQuad> solid_color_quad = + SolidColorDrawQuad::Create(); solid_color_quad->SetNew(shared_state.get(), rect, SK_ColorRED, false); AppendQuad(solid_color_quad.PassAs<DrawQuad>()); - scoped_ptr<cc::StreamVideoDrawQuad> stream_video_quad = - cc::StreamVideoDrawQuad::Create(); + scoped_ptr<StreamVideoDrawQuad> stream_video_quad = + StreamVideoDrawQuad::Create(); stream_video_quad->SetNew(shared_state.get(), rect, opaque_rect, @@ -163,8 +154,7 @@ void TestRenderPass::AppendOneOfEveryQuadType( gfx::Transform()); AppendQuad(stream_video_quad.PassAs<DrawQuad>()); - scoped_ptr<cc::TextureDrawQuad> texture_quad = - cc::TextureDrawQuad::Create(); + scoped_ptr<TextureDrawQuad> texture_quad = TextureDrawQuad::Create(); texture_quad->SetNew(shared_state.get(), rect, opaque_rect, @@ -177,8 +167,7 @@ void TestRenderPass::AppendOneOfEveryQuadType( false); AppendQuad(texture_quad.PassAs<DrawQuad>()); - scoped_ptr<cc::TileDrawQuad> scaled_tile_quad = - cc::TileDrawQuad::Create(); + scoped_ptr<TileDrawQuad> scaled_tile_quad = TileDrawQuad::Create(); scaled_tile_quad->SetNew(shared_state.get(), rect, opaque_rect, @@ -188,13 +177,12 @@ void TestRenderPass::AppendOneOfEveryQuadType( false); AppendQuad(scaled_tile_quad.PassAs<DrawQuad>()); - scoped_ptr<cc::SharedQuadState> transformed_state = shared_state->Copy(); + scoped_ptr<SharedQuadState> transformed_state = shared_state->Copy(); gfx::Transform rotation; rotation.Rotate(45); transformed_state->content_to_target_transform = transformed_state->content_to_target_transform * rotation; - scoped_ptr<cc::TileDrawQuad> transformed_tile_quad = - cc::TileDrawQuad::Create(); + scoped_ptr<TileDrawQuad> transformed_tile_quad = TileDrawQuad::Create(); transformed_tile_quad->SetNew(transformed_state.get(), rect, opaque_rect, @@ -204,7 +192,7 @@ void TestRenderPass::AppendOneOfEveryQuadType( false); AppendQuad(transformed_tile_quad.PassAs<DrawQuad>()); - scoped_ptr<cc::SharedQuadState> shared_state2 = cc::SharedQuadState::Create(); + scoped_ptr<SharedQuadState> shared_state2 = SharedQuadState::Create(); shared_state->SetAll(gfx::Transform(), rect.size(), rect, @@ -213,7 +201,7 @@ void TestRenderPass::AppendOneOfEveryQuadType( 1, SkXfermode::kSrcOver_Mode); - scoped_ptr<cc::TileDrawQuad> tile_quad = cc::TileDrawQuad::Create(); + scoped_ptr<TileDrawQuad> tile_quad = TileDrawQuad::Create(); tile_quad->SetNew(shared_state2.get(), rect, opaque_rect, @@ -233,8 +221,7 @@ void TestRenderPass::AppendOneOfEveryQuadType( resource_provider->best_texture_format()); resource_provider->AllocateForTesting(plane_resources[i]); } - scoped_ptr<cc::YUVVideoDrawQuad> yuv_quad = - cc::YUVVideoDrawQuad::Create(); + scoped_ptr<YUVVideoDrawQuad> yuv_quad = YUVVideoDrawQuad::Create(); yuv_quad->SetNew(shared_state2.get(), rect, opaque_rect, diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h index 4236fff..46e6012 100644 --- a/cc/test/scheduler_test_common.h +++ b/cc/test/scheduler_test_common.h @@ -14,7 +14,7 @@ namespace cc { -class FakeTimeSourceClient : public cc::TimeSourceClient { +class FakeTimeSourceClient : public TimeSourceClient { public: FakeTimeSourceClient() { Reset(); } void Reset() { tick_called_ = false; } @@ -27,7 +27,7 @@ class FakeTimeSourceClient : public cc::TimeSourceClient { bool tick_called_; }; -class FakeDelayBasedTimeSource : public cc::DelayBasedTimeSource { +class FakeDelayBasedTimeSource : public DelayBasedTimeSource { public: static scoped_refptr<FakeDelayBasedTimeSource> Create( base::TimeDelta interval, base::SingleThreadTaskRunner* task_runner) { @@ -47,10 +47,10 @@ class FakeDelayBasedTimeSource : public cc::DelayBasedTimeSource { base::TimeTicks now_; }; -class FakeFrameRateController : public cc::FrameRateController { +class FakeFrameRateController : public FrameRateController { public: - explicit FakeFrameRateController(scoped_refptr<cc::TimeSource> timer) - : cc::FrameRateController(timer) {} + explicit FakeFrameRateController(scoped_refptr<TimeSource> timer) + : FrameRateController(timer) {} int NumFramesPending() const { return num_frames_pending_; } }; diff --git a/cc/test/solid_color_content_layer_client.h b/cc/test/solid_color_content_layer_client.h index ad7c0f0..38d32b4 100644 --- a/cc/test/solid_color_content_layer_client.h +++ b/cc/test/solid_color_content_layer_client.h @@ -11,7 +11,7 @@ namespace cc { -class SolidColorContentLayerClient : public cc::ContentLayerClient { +class SolidColorContentLayerClient : public ContentLayerClient { public: explicit SolidColorContentLayerClient(SkColor color) : color_(color) {} diff --git a/cc/test/test_context_provider.h b/cc/test/test_context_provider.h index cea9b35..4290725 100644 --- a/cc/test/test_context_provider.h +++ b/cc/test/test_context_provider.h @@ -20,7 +20,7 @@ namespace cc { class TestWebGraphicsContext3D; class TestGLES2Interface; -class TestContextProvider : public cc::ContextProvider { +class TestContextProvider : public ContextProvider { public: typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)> CreateCallback; |