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

Unified Diff: cc/test/layer_tree_pixel_resource_test.cc

Issue 796663002: Update from https://crrev.com/307758 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Updates for SkCanvas::NewRaster deprecation Created 6 years 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/layer_tree_pixel_resource_test.h ('k') | cc/trees/layer_tree_host_pixeltest_blending.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_pixel_resource_test.cc
diff --git a/cc/test/layer_tree_pixel_resource_test.cc b/cc/test/layer_tree_pixel_resource_test.cc
index d5b5127e0fde3eb36c8ba64abb7ebb942d9184d1..e2b768a1bc7c08ba9162cac858f54c1e4a413527 100644
--- a/cc/test/layer_tree_pixel_resource_test.cc
+++ b/cc/test/layer_tree_pixel_resource_test.cc
@@ -47,12 +47,23 @@ LayerTreeHostPixelResourceTest::LayerTreeHostPixelResourceTest(
: staging_texture_target_(GL_INVALID_VALUE),
draw_texture_target_(GL_INVALID_VALUE),
resource_pool_option_(BITMAP_TILE_TASK_WORKER_POOL),
+ initialized_(false),
test_case_(test_case) {
InitializeFromTestCase(test_case);
}
+LayerTreeHostPixelResourceTest::LayerTreeHostPixelResourceTest()
+ : staging_texture_target_(GL_INVALID_VALUE),
+ draw_texture_target_(GL_INVALID_VALUE),
+ resource_pool_option_(BITMAP_TILE_TASK_WORKER_POOL),
+ initialized_(false),
+ test_case_(SOFTWARE) {
+}
+
void LayerTreeHostPixelResourceTest::InitializeFromTestCase(
PixelResourceTestCase test_case) {
+ DCHECK(!initialized_);
+ initialized_ = true;
switch (test_case) {
case SOFTWARE:
test_type_ = PIXEL_TEST_SOFTWARE;
@@ -121,6 +132,7 @@ void LayerTreeHostPixelResourceTest::CreateResourceAndTileTaskWorkerPool(
proxy()->HasImplThread() ? proxy()->ImplThreadTaskRunner()
: proxy()->MainThreadTaskRunner();
DCHECK(task_runner);
+ DCHECK(initialized_);
ContextProvider* context_provider =
host_impl->output_surface()->context_provider();
« no previous file with comments | « cc/test/layer_tree_pixel_resource_test.h ('k') | cc/trees/layer_tree_host_pixeltest_blending.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698