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

Unified Diff: core/cross/renderer_test.cc

Issue 150058: expose bitmap in js. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 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
« no previous file with comments | « core/cross/pack.cc ('k') | core/cross/texture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/cross/renderer_test.cc
===================================================================
--- core/cross/renderer_test.cc (revision 20557)
+++ core/cross/renderer_test.cc (working copy)
@@ -118,14 +118,14 @@
// TODO: add InitAndDestroyGL and InitAndDestroyMock
TEST_F(RendererTest, Creates2DTextureFromBitmap) {
- Bitmap bitmap;
- bitmap.Allocate(Texture::ARGB8, 16, 32, 2, false);
- memset(bitmap.image_data(), 0x34, bitmap.GetTotalSize());
+ Bitmap::Ref bitmap(new Bitmap(g_service_locator));
+ bitmap->Allocate(Texture::ARGB8, 16, 32, 2, false);
+ memset(bitmap->image_data(), 0x34, bitmap->GetTotalSize());
Client client(g_service_locator);
client.Init();
- Texture::Ref texture = g_renderer->CreateTextureFromBitmap(&bitmap);
+ Texture::Ref texture = g_renderer->CreateTextureFromBitmap(bitmap);
ASSERT_TRUE(NULL != texture);
EXPECT_EQ(Texture::ARGB8, texture->format());
EXPECT_EQ(2, texture->levels());
@@ -137,14 +137,14 @@
}
TEST_F(RendererTest, CreatesCubeTextureFromBitmap) {
- Bitmap bitmap;
- bitmap.Allocate(Texture::ARGB8, 16, 16, 2, true);
- memset(bitmap.image_data(), 0x34, bitmap.GetTotalSize());
+ Bitmap::Ref bitmap(new Bitmap(g_service_locator));
+ bitmap->Allocate(Texture::ARGB8, 16, 16, 2, true);
+ memset(bitmap->image_data(), 0x34, bitmap->GetTotalSize());
Client client(g_service_locator);
client.Init();
- Texture::Ref texture = g_renderer->CreateTextureFromBitmap(&bitmap);
+ Texture::Ref texture = g_renderer->CreateTextureFromBitmap(bitmap);
ASSERT_TRUE(NULL != texture);
EXPECT_EQ(Texture::ARGB8, texture->format());
EXPECT_EQ(2, texture->levels());
« no previous file with comments | « core/cross/pack.cc ('k') | core/cross/texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698