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

Unified Diff: cc/test/fake_content_layer.cc

Issue 11662003: cc: Put context-loss tests in layer_tree_host_unittest_context.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 80cols Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_content_layer.h ('k') | cc/test/fake_content_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_content_layer.cc
diff --git a/cc/test/fake_content_layer.cc b/cc/test/fake_content_layer.cc
index f217e936649b77616ff4bbbfac37baddfdddc467..c103b2403e1d621c990773e1fd79e37ddbba5f8b 100644
--- a/cc/test/fake_content_layer.cc
+++ b/cc/test/fake_content_layer.cc
@@ -4,6 +4,9 @@
#include "cc/test/fake_content_layer.h"
+#include "cc/prioritized_resource.h"
+#include "cc/test/fake_content_layer_impl.h"
+
namespace cc {
FakeContentLayer::FakeContentLayer(ContentLayerClient* client)
@@ -16,6 +19,11 @@ FakeContentLayer::FakeContentLayer(ContentLayerClient* client)
FakeContentLayer::~FakeContentLayer() {}
+scoped_ptr<LayerImpl> FakeContentLayer::createLayerImpl(
+ LayerTreeImpl* tree_impl) {
+ return FakeContentLayerImpl::Create(tree_impl, m_layerId).PassAs<LayerImpl>();
+}
+
void FakeContentLayer::update(
ResourceUpdateQueue& queue,
const OcclusionTracker* occlusion,
@@ -24,4 +32,9 @@ void FakeContentLayer::update(
update_count_++;
}
+bool FakeContentLayer::HaveBackingAt(int i, int j) {
+ const PrioritizedResource* resource = resourceAtForTesting(i, j);
+ return resource && resource->haveBackingTexture();
+}
+
} // namespace cc
« no previous file with comments | « cc/test/fake_content_layer.h ('k') | cc/test/fake_content_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698