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

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

Issue 1001703003: Take NativeImageSkia out behind the woodshed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switch to skia-style API (return bool instead of SkBitmap) Created 5 years, 9 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 unified diff | Download patch | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "platform/graphics/StaticBitmapImage.h" 6 #include "platform/graphics/StaticBitmapImage.h"
7 7
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/skia/NativeImageSkia.h"
11 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
12 #include "third_party/skia/include/core/SkImage.h" 11 #include "third_party/skia/include/core/SkImage.h"
13 #include "third_party/skia/include/core/SkPaint.h" 12 #include "third_party/skia/include/core/SkPaint.h"
14 #include "third_party/skia/include/core/SkShader.h" 13 #include "third_party/skia/include/core/SkShader.h"
15 14
16 namespace blink { 15 namespace blink {
17 16
18 PassRefPtr<Image> StaticBitmapImage::create(PassRefPtr<SkImage> image) 17 PassRefPtr<Image> StaticBitmapImage::create(PassRefPtr<SkImage> image)
19 { 18 {
20 return adoptRef(new StaticBitmapImage(image)); 19 return adoptRef(new StaticBitmapImage(image));
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 59
61 canvas->drawImageRect(m_image.get(), &srcSkRect, dstSkRect, &paint); 60 canvas->drawImageRect(m_image.get(), &srcSkRect, dstSkRect, &paint);
62 canvas->restoreToCount(initialSaveCount); 61 canvas->restoreToCount(initialSaveCount);
63 } 62 }
64 63
65 if (ImageObserver* observer = imageObserver()) 64 if (ImageObserver* observer = imageObserver())
66 observer->didDraw(this); 65 observer->didDraw(this);
67 } 66 }
68 67
69 } // namespace blink 68 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/ImageSource.cpp ('k') | Source/platform/graphics/gpu/WebGLImageConversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698