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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 138393002: replace etc1_pixel_ref with skia version (SkMallocPixelRef) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« cc/resources/ui_resource_bitmap.cc ('K') | « cc/resources/ui_resource_bitmap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index f8207b54a940a1215560879d13994ca954f66818..48a552dcf04e34a03733addf34500253ab585e1e 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -35,7 +35,6 @@
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/texture_draw_quad.h"
#include "cc/quads/tile_draw_quad.h"
-#include "cc/resources/etc1_pixel_ref.h"
#include "cc/resources/layer_tiling_data.h"
#include "cc/test/animation_test_common.h"
#include "cc/test/fake_layer_tree_host_impl.h"
@@ -5133,15 +5132,7 @@ TEST_F(LayerTreeHostImplTest, CreateETC1UIResource) {
EXPECT_EQ(0u, context3d->NumTextures());
SkImageInfo info = {4, 4, kPMColor_SkColorType, kPremul_SkAlphaType};
- size_t rowBytes = info.minRowBytes();
- scoped_ptr<uint8_t[]> pixels(new uint8_t[rowBytes * info.fHeight]);
- skia::RefPtr<ETC1PixelRef> etc1_pixel_ref =
- skia::AdoptRef(new ETC1PixelRef(info, rowBytes, pixels.Pass()));
- UIResourceBitmap bitmap(etc1_pixel_ref, gfx::Size(info.fWidth, info.fHeight));
- // TODO(powel) Now that pixel_refs have info, the UIResourceBitmap
- // constructor can get the can size from (pixelref->info().fWidth,
- // pixelref->info().fHeight).
-
+ UIResourceBitmap bitmap(info);
UIResourceId ui_resource_id = 1;
host_impl_->CreateUIResource(ui_resource_id, bitmap);
EXPECT_EQ(1u, context3d->NumTextures());
« cc/resources/ui_resource_bitmap.cc ('K') | « cc/resources/ui_resource_bitmap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698