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

Unified Diff: cc/resources/resource_update_controller_unittest.cc

Issue 20185002: ContextProvider in OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: contextprovider: don't access Context3d() in OutputSurface contructors, it's not bound yet Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | cc/resources/scoped_resource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_update_controller_unittest.cc
diff --git a/cc/resources/resource_update_controller_unittest.cc b/cc/resources/resource_update_controller_unittest.cc
index 9dcb23ca124020f5ba2bb0db7c767267fcc56c38..e7c59bf6920054a8568e2e8407149d2c0814f163 100644
--- a/cc/resources/resource_update_controller_unittest.cc
+++ b/cc/resources/resource_update_controller_unittest.cc
@@ -8,6 +8,7 @@
#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/resources/prioritized_resource_manager.h"
#include "cc/test/fake_output_surface.h"
+#include "cc/test/fake_output_surface_client.h"
#include "cc/test/fake_proxy.h"
#include "cc/test/scheduler_test_common.h"
#include "cc/test/tiled_layer_test_common.h"
@@ -124,9 +125,6 @@ class ResourceUpdateControllerTest : public Test {
protected:
virtual void SetUp() {
- output_surface_ =
- FakeOutputSurface::Create3d(scoped_ptr<WebKit::WebGraphicsContext3D>(
- new WebGraphicsContext3DForUploadTest(this)));
bitmap_.setConfig(SkBitmap::kARGB_8888_Config, 300, 150);
bitmap_.allocPixels();
@@ -138,6 +136,11 @@ class ResourceUpdateControllerTest : public Test {
}
resource_manager_->PrioritizeTextures();
+ output_surface_ = FakeOutputSurface::Create3d(
+ scoped_ptr<TestWebGraphicsContext3D>(
+ new WebGraphicsContext3DForUploadTest(this)));
+ CHECK(output_surface_->BindToClient(&output_surface_client_));
+
resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0);
}
@@ -193,6 +196,7 @@ class ResourceUpdateControllerTest : public Test {
protected:
// Classes required to interact and test the ResourceUpdateController
FakeProxy proxy_;
+ FakeOutputSurfaceClient output_surface_client_;
scoped_ptr<OutputSurface> output_surface_;
scoped_ptr<ResourceProvider> resource_provider_;
scoped_ptr<ResourceUpdateQueue> queue_;
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | cc/resources/scoped_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698