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

Unified Diff: cc/layers/texture_layer_unittest.cc

Issue 18796008: Implement shareResources==true in TestWebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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
Index: cc/layers/texture_layer_unittest.cc
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index fac9a98ff10129e3c0300b58088f4b39d1eb5fd0..db159deca551c61f3473f80457d79160e2f2921d 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -205,7 +205,8 @@ TEST_F(TextureLayerTest, CheckPropertyChangeCausesCorrectBehavior) {
class FakeTextureLayerClient : public TextureLayerClient {
public:
- FakeTextureLayerClient() : context_(TestWebGraphicsContext3D::Create()) {}
+ FakeTextureLayerClient()
+ : context_(TestWebGraphicsContext3D::CreateShared()) {}
virtual unsigned PrepareTexture() OVERRIDE {
return 0;
@@ -767,7 +768,7 @@ class TextureLayerClientTest
virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE {
scoped_ptr<TestWebGraphicsContext3D> context(
- TestWebGraphicsContext3D::Create());
+ TestWebGraphicsContext3D::CreateShared());
context_ = context.get();
texture_ = context->createTexture();
return FakeOutputSurface::Create3d(
@@ -880,12 +881,9 @@ class TextureLayerLostContextTest
draw_count_(0) {}
virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE {
- texture_context_ = TestWebGraphicsContext3D::Create();
+ texture_context_ = TestWebGraphicsContext3D::CreateShared();
texture_ = texture_context_->createTexture();
- scoped_ptr<TestWebGraphicsContext3D> context(
- TestWebGraphicsContext3D::Create());
- return FakeOutputSurface::Create3d(
- context.PassAs<WebKit::WebGraphicsContext3D>()).PassAs<OutputSurface>();
+ return CreateFakeOutputSurface();
}
virtual unsigned PrepareTexture() OVERRIDE {

Powered by Google App Engine
This is Rietveld 408576698