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

Unified Diff: cc/resources/ui_resource_bitmap.cc

Issue 151103010: Revert of android: Migrate old content readback to use async readback (and delegated renderer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/ui_resource_bitmap.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/ui_resource_bitmap.cc
diff --git a/cc/resources/ui_resource_bitmap.cc b/cc/resources/ui_resource_bitmap.cc
index 562e13a234ce09070aefac08791d994959e5d6b8..b84eb8e097cc2bb290cfd5545044c1de54dd3875 100644
--- a/cc/resources/ui_resource_bitmap.cc
+++ b/cc/resources/ui_resource_bitmap.cc
@@ -13,14 +13,14 @@
namespace cc {
void UIResourceBitmap::Create(const skia::RefPtr<SkPixelRef>& pixel_ref,
- gfx::Size size,
UIResourceFormat format) {
- DCHECK(size.width());
- DCHECK(size.height());
+ const SkImageInfo& info = pixel_ref->info();
+ DCHECK(info.fWidth);
+ DCHECK(info.fHeight);
DCHECK(pixel_ref);
DCHECK(pixel_ref->isImmutable());
format_ = format;
- size_ = size;
+ size_ = gfx::Size(info.fWidth, info.fHeight);
pixel_ref_ = pixel_ref;
// Default values for secondary parameters.
@@ -34,16 +34,13 @@
DCHECK(skbitmap.isImmutable());
skia::RefPtr<SkPixelRef> pixel_ref = skia::SharePtr(skbitmap.pixelRef());
- const SkImageInfo& info = pixel_ref->info();
- Create(
- pixel_ref, gfx::Size(info.fWidth, info.fHeight), UIResourceBitmap::RGBA8);
+ Create(pixel_ref, UIResourceBitmap::RGBA8);
SetOpaque(skbitmap.isOpaque());
}
-UIResourceBitmap::UIResourceBitmap(const skia::RefPtr<SkPixelRef>& pixel_ref,
- gfx::Size size) {
- Create(pixel_ref, size, UIResourceBitmap::ETC1);
+UIResourceBitmap::UIResourceBitmap(const skia::RefPtr<SkPixelRef>& pixel_ref) {
+ Create(pixel_ref, UIResourceBitmap::ETC1);
}
UIResourceBitmap::~UIResourceBitmap() {}
« no previous file with comments | « cc/resources/ui_resource_bitmap.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698