OLD | NEW |
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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 3544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3555 ResourceProvider* resource_provider) | 3555 ResourceProvider* resource_provider) |
3556 : LayerImpl(tree_impl, id), | 3556 : LayerImpl(tree_impl, id), |
3557 blend_(false), | 3557 blend_(false), |
3558 has_render_surface_(false), | 3558 has_render_surface_(false), |
3559 quads_appended_(false), | 3559 quads_appended_(false), |
3560 quad_rect_(5, 5, 5, 5), | 3560 quad_rect_(5, 5, 5, 5), |
3561 quad_visible_rect_(5, 5, 5, 5), | 3561 quad_visible_rect_(5, 5, 5, 5), |
3562 resource_id_(resource_provider->CreateResource( | 3562 resource_id_(resource_provider->CreateResource( |
3563 gfx::Size(1, 1), | 3563 gfx::Size(1, 1), |
3564 GL_CLAMP_TO_EDGE, | 3564 GL_CLAMP_TO_EDGE, |
3565 ResourceProvider::TextureUsageAny, | 3565 ResourceProvider::TextureHintImmutable, |
3566 RGBA_8888)) { | 3566 RGBA_8888)) { |
3567 resource_provider->AllocateForTesting(resource_id_); | 3567 resource_provider->AllocateForTesting(resource_id_); |
3568 SetBounds(gfx::Size(10, 10)); | 3568 SetBounds(gfx::Size(10, 10)); |
3569 SetContentBounds(gfx::Size(10, 10)); | 3569 SetContentBounds(gfx::Size(10, 10)); |
3570 SetDrawsContent(true); | 3570 SetDrawsContent(true); |
3571 } | 3571 } |
3572 | 3572 |
3573 bool blend_; | 3573 bool blend_; |
3574 bool has_render_surface_; | 3574 bool has_render_surface_; |
3575 bool quads_appended_; | 3575 bool quads_appended_; |
(...skipping 3449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7025 host_impl_->DidLoseOutputSurface(); | 7025 host_impl_->DidLoseOutputSurface(); |
7026 EXPECT_TRUE(host_impl_->IsContextLost()); | 7026 EXPECT_TRUE(host_impl_->IsContextLost()); |
7027 EXPECT_EQ(1, num_lost_surfaces_); | 7027 EXPECT_EQ(1, num_lost_surfaces_); |
7028 host_impl_->DidLoseOutputSurface(); | 7028 host_impl_->DidLoseOutputSurface(); |
7029 EXPECT_TRUE(host_impl_->IsContextLost()); | 7029 EXPECT_TRUE(host_impl_->IsContextLost()); |
7030 EXPECT_EQ(1, num_lost_surfaces_); | 7030 EXPECT_EQ(1, num_lost_surfaces_); |
7031 } | 7031 } |
7032 | 7032 |
7033 } // namespace | 7033 } // namespace |
7034 } // namespace cc | 7034 } // namespace cc |
OLD | NEW |