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

Unified Diff: cc/resources/ui_resource_bitmap.cc

Issue 27973002: cc: Adding ETC1 support to UIResourceBitmap and ResourceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: latest comments Created 7 years, 2 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/scheduler/texture_uploader.h » ('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 86acfa5185ce4e804be120863286fd13a400a6be..c85bc19e0be397d1748eb210ad0d485d5b90de49 100644
--- a/cc/resources/ui_resource_bitmap.cc
+++ b/cc/resources/ui_resource_bitmap.cc
@@ -12,20 +12,20 @@ namespace cc {
void UIResourceBitmap::Create(const skia::RefPtr<SkPixelRef>& pixel_ref,
UIResourceFormat format,
- UIResourceWrapMode wrap_mode,
gfx::Size size) {
DCHECK(size.width());
DCHECK(size.height());
DCHECK(pixel_ref);
DCHECK(pixel_ref->isImmutable());
format_ = format;
- wrap_mode_ = wrap_mode;
size_ = size;
pixel_ref_ = pixel_ref;
+
+ // Wrap mode defaults to CLAMP_TO_EDGE.
+ wrap_mode_ = CLAMP_TO_EDGE;
}
-UIResourceBitmap::UIResourceBitmap(const SkBitmap& skbitmap,
- UIResourceWrapMode wrap_mode) {
+UIResourceBitmap::UIResourceBitmap(const SkBitmap& skbitmap) {
DCHECK_EQ(skbitmap.config(), SkBitmap::kARGB_8888_Config);
DCHECK_EQ(skbitmap.width(), skbitmap.rowBytesAsPixels());
DCHECK(skbitmap.isImmutable());
@@ -33,10 +33,15 @@ UIResourceBitmap::UIResourceBitmap(const SkBitmap& skbitmap,
skia::RefPtr<SkPixelRef> pixel_ref = skia::SharePtr(skbitmap.pixelRef());
Create(pixel_ref,
UIResourceBitmap::RGBA8,
- wrap_mode,
gfx::Size(skbitmap.width(), skbitmap.height()));
}
+UIResourceBitmap::UIResourceBitmap(const skia::RefPtr<SkPixelRef>& pixel_ref,
+ UIResourceFormat format,
+ gfx::Size size) {
+ Create(pixel_ref, format, size);
+}
+
UIResourceBitmap::~UIResourceBitmap() {}
AutoLockUIResourceBitmap::AutoLockUIResourceBitmap(
« no previous file with comments | « cc/resources/ui_resource_bitmap.h ('k') | cc/scheduler/texture_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698