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

Unified Diff: cc/test/fake_ui_resource_layer_tree_host_impl.cc

Issue 1062043003: cc: Add ResourceId validation checks at the time of AppendQuads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resource-validate: fixtests Created 5 years, 8 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_ui_resource_layer_tree_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_ui_resource_layer_tree_host_impl.cc
diff --git a/cc/test/fake_ui_resource_layer_tree_host_impl.cc b/cc/test/fake_ui_resource_layer_tree_host_impl.cc
index 43617a6ca085217c1217a328604824128a415c85..3dbea527e4ceb830724a6fef9b3cf881c21a32f4 100644
--- a/cc/test/fake_ui_resource_layer_tree_host_impl.cc
+++ b/cc/test/fake_ui_resource_layer_tree_host_impl.cc
@@ -12,8 +12,7 @@ namespace cc {
FakeUIResourceLayerTreeHostImpl::FakeUIResourceLayerTreeHostImpl(
Proxy* proxy,
SharedBitmapManager* manager)
- : FakeLayerTreeHostImpl(proxy, manager, nullptr),
- fake_next_resource_id_(1) {
+ : FakeLayerTreeHostImpl(proxy, manager, nullptr) {
}
FakeUIResourceLayerTreeHostImpl::~FakeUIResourceLayerTreeHostImpl() {}
@@ -25,7 +24,10 @@ void FakeUIResourceLayerTreeHostImpl::CreateUIResource(
DeleteUIResource(uid);
UIResourceData data;
- data.resource_id = fake_next_resource_id_++;
+ data.resource_id = resource_provider()->CreateResource(
+ bitmap.GetSize(), GL_CLAMP_TO_EDGE,
+ ResourceProvider::TEXTURE_HINT_IMMUTABLE, RGBA_8888);
+
data.size = bitmap.GetSize();
data.opaque = bitmap.GetOpaque();
fake_ui_resource_map_[uid] = data;
« no previous file with comments | « cc/test/fake_ui_resource_layer_tree_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698