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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp

Issue 2447623002: Remove ImageObserver::didDraw() (Closed)
Patch Set: Rebawse Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/StaticBitmapImage.h" 5 #include "platform/graphics/StaticBitmapImage.h"
6 6
7 #include "platform/graphics/AcceleratedStaticBitmapImage.h" 7 #include "platform/graphics/AcceleratedStaticBitmapImage.h"
8 #include "platform/graphics/GraphicsContext.h" 8 #include "platform/graphics/GraphicsContext.h"
9 #include "platform/graphics/ImageObserver.h" 9 #include "platform/graphics/ImageObserver.h"
10 #include "platform/graphics/UnacceleratedStaticBitmapImage.h" 10 #include "platform/graphics/UnacceleratedStaticBitmapImage.h"
(...skipping 19 matching lines...) Expand all
30 ImageClampingMode clampMode, 30 ImageClampingMode clampMode,
31 sk_sp<SkImage> image) { 31 sk_sp<SkImage> image) {
32 FloatRect adjustedSrcRect = srcRect; 32 FloatRect adjustedSrcRect = srcRect;
33 adjustedSrcRect.intersect(SkRect::Make(image->bounds())); 33 adjustedSrcRect.intersect(SkRect::Make(image->bounds()));
34 34
35 if (dstRect.isEmpty() || adjustedSrcRect.isEmpty()) 35 if (dstRect.isEmpty() || adjustedSrcRect.isEmpty())
36 return; // Nothing to draw. 36 return; // Nothing to draw.
37 37
38 canvas->drawImageRect(image.get(), adjustedSrcRect, dstRect, &paint, 38 canvas->drawImageRect(image.get(), adjustedSrcRect, dstRect, &paint,
39 WebCoreClampingModeToSkiaRectConstraint(clampMode)); 39 WebCoreClampingModeToSkiaRectConstraint(clampMode));
40
41 if (ImageObserver* observer = getImageObserver())
42 observer->didDraw(this);
43 } 40 }
44 41
45 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698