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

Unified Diff: Source/platform/graphics/Pattern.cpp

Issue 1290983003: SkImage-only bitmap patterns (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: drop non-repeat optimization Created 5 years, 4 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: Source/platform/graphics/Pattern.cpp
diff --git a/Source/platform/graphics/Pattern.cpp b/Source/platform/graphics/Pattern.cpp
index 60bae88e5f49e17bc984caa59a68bf9fb59502e5..afcb8c0e9ca22aa60f33a654da8cdbd065d46fd1 100644
--- a/Source/platform/graphics/Pattern.cpp
+++ b/Source/platform/graphics/Pattern.cpp
@@ -28,9 +28,8 @@
#include "config.h"
#include "platform/graphics/Pattern.h"
-#include "platform/graphics/BitmapPattern.h"
+#include "platform/graphics/ImagePattern.h"
#include "platform/graphics/PicturePattern.h"
-#include "platform/graphics/StaticBitmapPattern.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "third_party/skia/include/core/SkShader.h"
@@ -38,13 +37,9 @@
namespace blink {
-PassRefPtr<Pattern> Pattern::createBitmapPattern(PassRefPtr<Image> tileImage, RepeatMode repeatMode)
+PassRefPtr<Pattern> Pattern::createImagePattern(PassRefPtr<Image> tileImage, RepeatMode repeatMode)
{
- // TODO(fmalita): do we still need BitmapPattern at all?
- if (tileImage->isBitmapImage())
- return BitmapPattern::create(tileImage, repeatMode);
-
- return StaticBitmapPattern::create(tileImage, repeatMode);
+ return ImagePattern::create(tileImage, repeatMode);
}
PassRefPtr<Pattern> Pattern::createPicturePattern(PassRefPtr<const SkPicture> picture,

Powered by Google App Engine
This is Rietveld 408576698