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

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

Issue 1812273003: Eliminate copies of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert to PassRefPtr in ImageDecoder, helper for setData Created 4 years, 8 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 // 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/gpu/WebGLImageConversion.h" 5 #include "platform/graphics/gpu/WebGLImageConversion.h"
6 6
7 #include "platform/CheckedInt.h" 7 #include "platform/CheckedInt.h"
8 #include "platform/graphics/ImageObserver.h" 8 #include "platform/graphics/ImageObserver.h"
9 #include "platform/graphics/cpu/arm/WebGLImageConversionNEON.h" 9 #include "platform/graphics/cpu/arm/WebGLImageConversionNEON.h"
10 #include "platform/graphics/cpu/x86/WebGLImageConversionSSE.h" 10 #include "platform/graphics/cpu/x86/WebGLImageConversionSSE.h"
11 #include "platform/image-decoders/ImageDecoder.h" 11 #include "platform/image-decoders/ImageDecoder.h"
12 #include "platform/image-decoders/SharedBufferSegmentReader.h"
12 #include "third_party/skia/include/core/SkImage.h" 13 #include "third_party/skia/include/core/SkImage.h"
13 #include "wtf/OwnPtr.h" 14 #include "wtf/OwnPtr.h"
14 #include "wtf/PassOwnPtr.h" 15 #include "wtf/PassOwnPtr.h"
15 16
16 namespace blink { 17 namespace blink {
17 18
18 namespace { 19 namespace {
19 20
20 const float maxInt8Value = INT8_MAX; 21 const float maxInt8Value = INT8_MAX;
21 const float maxUInt8Value = UINT8_MAX; 22 const float maxUInt8Value = UINT8_MAX;
(...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2331 } 2332 }
2332 2333
2333 FormatConverter converter(width, height, sourceData, destinationData, srcStr ide, dstStride); 2334 FormatConverter converter(width, height, sourceData, destinationData, srcStr ide, dstStride);
2334 converter.convert(sourceDataFormat, dstDataFormat, alphaOp); 2335 converter.convert(sourceDataFormat, dstDataFormat, alphaOp);
2335 if (!converter.Success()) 2336 if (!converter.Success())
2336 return false; 2337 return false;
2337 return true; 2338 return true;
2338 } 2339 }
2339 2340
2340 } // namespace blink 2341 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698