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

Unified Diff: Source/core/frame/ImageBitmap.cpp

Issue 1170523002: Removing GraphicsContext from ImageBuffer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix for shape bug Created 5 years, 6 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 | « no previous file | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/ImageBitmap.cpp
diff --git a/Source/core/frame/ImageBitmap.cpp b/Source/core/frame/ImageBitmap.cpp
index ee76ed53a8be351bbcad4a73ed051e29ffbdf3ef..6fd8aac9f1bba616b3adf5866658bd46391bd5f9 100644
--- a/Source/core/frame/ImageBitmap.cpp
+++ b/Source/core/frame/ImageBitmap.cpp
@@ -11,8 +11,8 @@
#include "platform/graphics/BitmapImage.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/ImageBuffer.h"
-#include "platform/graphics/paint/DisplayItemListContextRecorder.h"
#include "platform/graphics/paint/DrawingRecorder.h"
+#include "platform/graphics/paint/SkPictureBuilder.h"
#include "wtf/RefPtr.h"
namespace blink {
@@ -73,16 +73,8 @@ ImageBitmap::ImageBitmap(HTMLVideoElement* video, const IntRect& cropRect)
if (!buffer)
return;
- {
- DisplayItemListContextRecorder contextRecorder(*buffer->context());
- GraphicsContext& paintContext = contextRecorder.context();
-
- DrawingRecorder recorder(paintContext, *buffer, DisplayItem::VideoBitmap, videoRect);
- if (!recorder.canUseCachedDrawing()) {
- paintContext.clip(dstRect);
- paintContext.translate(-srcRect.x(), -srcRect.y());
- }
- }
+ buffer->canvas()->clipRect(dstRect);
+ buffer->canvas()->translate(-srcRect.x(), -srcRect.y());
video->paintCurrentFrame(buffer->canvas(), videoRect, nullptr);
m_bitmap = buffer->copyImage(DontCopyBackingStore);
« no previous file with comments | « no previous file | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698