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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ImageBuffer.h

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 20 matching lines...) Expand all
31 #include "platform/PlatformExport.h" 31 #include "platform/PlatformExport.h"
32 #include "platform/geometry/FloatRect.h" 32 #include "platform/geometry/FloatRect.h"
33 #include "platform/geometry/IntSize.h" 33 #include "platform/geometry/IntSize.h"
34 #include "platform/graphics/Canvas2DLayerBridge.h" 34 #include "platform/graphics/Canvas2DLayerBridge.h"
35 #include "platform/graphics/GraphicsTypes.h" 35 #include "platform/graphics/GraphicsTypes.h"
36 #include "platform/graphics/GraphicsTypes3D.h" 36 #include "platform/graphics/GraphicsTypes3D.h"
37 #include "platform/graphics/ImageBufferSurface.h" 37 #include "platform/graphics/ImageBufferSurface.h"
38 #include "platform/transforms/AffineTransform.h" 38 #include "platform/transforms/AffineTransform.h"
39 #include "third_party/skia/include/core/SkPaint.h" 39 #include "third_party/skia/include/core/SkPaint.h"
40 #include "third_party/skia/include/core/SkPicture.h" 40 #include "third_party/skia/include/core/SkPicture.h"
41 #include "third_party/skia/include/core/SkRefCnt.h"
41 #include "wtf/Forward.h" 42 #include "wtf/Forward.h"
42 #include "wtf/PassRefPtr.h" 43 #include "wtf/PassRefPtr.h"
43 #include "wtf/Vector.h" 44 #include "wtf/Vector.h"
44 #include "wtf/text/WTFString.h" 45 #include "wtf/text/WTFString.h"
45 #include "wtf/typed_arrays/Uint8ClampedArray.h" 46 #include "wtf/typed_arrays/Uint8ClampedArray.h"
46 #include <memory> 47 #include <memory>
47 48
48 namespace gpu { 49 namespace gpu {
49 namespace gles2 { 50 namespace gles2 {
50 class GLES2Interface; 51 class GLES2Interface;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Destroys the TEXTURE_2D binding for the active texture unit of the passed context 129 // Destroys the TEXTURE_2D binding for the active texture unit of the passed context
129 bool copyToPlatformTexture(gpu::gles2::GLES2Interface*, GLuint texture, GLen um internalFormat, GLenum destType, GLint level, bool premultiplyAlpha, bool fli pY); 130 bool copyToPlatformTexture(gpu::gles2::GLES2Interface*, GLuint texture, GLen um internalFormat, GLenum destType, GLint level, bool premultiplyAlpha, bool fli pY);
130 131
131 bool copyRenderingResultsFromDrawingBuffer(DrawingBuffer*, SourceDrawingBuff er); 132 bool copyRenderingResultsFromDrawingBuffer(DrawingBuffer*, SourceDrawingBuff er);
132 133
133 void flush(FlushReason); // process deferred draw commands immediately 134 void flush(FlushReason); // process deferred draw commands immediately
134 void flushGpu(FlushReason); // Like flush(), but flushes all the way down to the Gpu context if the surface is accelerated 135 void flushGpu(FlushReason); // Like flush(), but flushes all the way down to the Gpu context if the surface is accelerated
135 136
136 void notifySurfaceInvalid(); 137 void notifySurfaceInvalid();
137 138
138 PassRefPtr<SkImage> newSkImageSnapshot(AccelerationHint, SnapshotReason) con st; 139 sk_sp<SkImage> newSkImageSnapshot(AccelerationHint, SnapshotReason) const;
139 PassRefPtr<Image> newImageSnapshot(AccelerationHint = PreferNoAcceleration, SnapshotReason = SnapshotReasonUnknown) const; 140 PassRefPtr<Image> newImageSnapshot(AccelerationHint = PreferNoAcceleration, SnapshotReason = SnapshotReasonUnknown) const;
140 141
141 PassRefPtr<SkPicture> getPicture() { return m_surface->getPicture(); } 142 sk_sp<SkPicture> getPicture() { return m_surface->getPicture(); }
142 143
143 void draw(GraphicsContext&, const FloatRect&, const FloatRect*, SkXfermode:: Mode); 144 void draw(GraphicsContext&, const FloatRect&, const FloatRect*, SkXfermode:: Mode);
144 145
145 void updateGPUMemoryUsage() const; 146 void updateGPUMemoryUsage() const;
146 static intptr_t getGlobalGPUMemoryUsage() { return s_globalGPUMemoryUsage; } 147 static intptr_t getGlobalGPUMemoryUsage() { return s_globalGPUMemoryUsage; }
147 static unsigned getGlobalAcceleratedImageBufferCount() { return s_globalAcce leratedImageBufferCount; } 148 static unsigned getGlobalAcceleratedImageBufferCount() { return s_globalAcce leratedImageBufferCount; }
148 intptr_t getGPUMemoryUsage() { return m_gpuMemoryUsage; } 149 intptr_t getGPUMemoryUsage() { return m_gpuMemoryUsage; }
149 150
150 void disableAcceleration(); 151 void disableAcceleration();
151 152
(...skipping 27 matching lines...) Expand all
179 int height() const { return m_size.height(); } 180 int height() const { return m_size.height(); }
180 int width() const { return m_size.width(); } 181 int width() const { return m_size.width(); }
181 182
182 const unsigned char* m_data; 183 const unsigned char* m_data;
183 const IntSize m_size; 184 const IntSize m_size;
184 }; 185 };
185 186
186 } // namespace blink 187 } // namespace blink
187 188
188 #endif // ImageBuffer_h 189 #endif // ImageBuffer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.cpp ('k') | third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698