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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 486853002: cc: Use a normal texture for background texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months 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
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 "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 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after
3554 ResourceProvider* resource_provider) 3554 ResourceProvider* resource_provider)
3555 : LayerImpl(tree_impl, id), 3555 : LayerImpl(tree_impl, id),
3556 blend_(false), 3556 blend_(false),
3557 has_render_surface_(false), 3557 has_render_surface_(false),
3558 quads_appended_(false), 3558 quads_appended_(false),
3559 quad_rect_(5, 5, 5, 5), 3559 quad_rect_(5, 5, 5, 5),
3560 quad_visible_rect_(5, 5, 5, 5), 3560 quad_visible_rect_(5, 5, 5, 5),
3561 resource_id_(resource_provider->CreateResource( 3561 resource_id_(resource_provider->CreateResource(
3562 gfx::Size(1, 1), 3562 gfx::Size(1, 1),
3563 GL_CLAMP_TO_EDGE, 3563 GL_CLAMP_TO_EDGE,
3564 ResourceProvider::TextureUsageAny, 3564 ResourceProvider::TextureHintImmutable,
3565 RGBA_8888)) { 3565 RGBA_8888)) {
3566 resource_provider->AllocateForTesting(resource_id_); 3566 resource_provider->AllocateForTesting(resource_id_);
3567 SetBounds(gfx::Size(10, 10)); 3567 SetBounds(gfx::Size(10, 10));
3568 SetContentBounds(gfx::Size(10, 10)); 3568 SetContentBounds(gfx::Size(10, 10));
3569 SetDrawsContent(true); 3569 SetDrawsContent(true);
3570 } 3570 }
3571 3571
3572 bool blend_; 3572 bool blend_;
3573 bool has_render_surface_; 3573 bool has_render_surface_;
3574 bool quads_appended_; 3574 bool quads_appended_;
(...skipping 3449 matching lines...) Expand 10 before | Expand all | Expand 10 after
7024 host_impl_->DidLoseOutputSurface(); 7024 host_impl_->DidLoseOutputSurface();
7025 EXPECT_TRUE(host_impl_->IsContextLost()); 7025 EXPECT_TRUE(host_impl_->IsContextLost());
7026 EXPECT_EQ(1, num_lost_surfaces_); 7026 EXPECT_EQ(1, num_lost_surfaces_);
7027 host_impl_->DidLoseOutputSurface(); 7027 host_impl_->DidLoseOutputSurface();
7028 EXPECT_TRUE(host_impl_->IsContextLost()); 7028 EXPECT_TRUE(host_impl_->IsContextLost());
7029 EXPECT_EQ(1, num_lost_surfaces_); 7029 EXPECT_EQ(1, num_lost_surfaces_);
7030 } 7030 }
7031 7031
7032 } // namespace 7032 } // namespace
7033 } // namespace cc 7033 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698