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

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

Issue 1213003004: Fix virtual/override/final usage in Source/platform/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 27 matching lines...) Expand all
38 // This is used to write directly to the memory given by Skia during decoding. 38 // This is used to write directly to the memory given by Skia during decoding.
39 class ImageFrameGenerator::ExternalMemoryAllocator : public SkBitmap::Allocator { 39 class ImageFrameGenerator::ExternalMemoryAllocator : public SkBitmap::Allocator {
40 public: 40 public:
41 ExternalMemoryAllocator(const SkImageInfo& info, void* pixels, size_t rowByt es) 41 ExternalMemoryAllocator(const SkImageInfo& info, void* pixels, size_t rowByt es)
42 : m_info(info) 42 : m_info(info)
43 , m_pixels(pixels) 43 , m_pixels(pixels)
44 , m_rowBytes(rowBytes) 44 , m_rowBytes(rowBytes)
45 { 45 {
46 } 46 }
47 47
48 virtual bool allocPixelRef(SkBitmap* dst, SkColorTable* ctable) override 48 bool allocPixelRef(SkBitmap* dst, SkColorTable* ctable) override
49 { 49 {
50 const SkImageInfo& info = dst->info(); 50 const SkImageInfo& info = dst->info();
51 if (kUnknown_SkColorType == info.colorType()) 51 if (kUnknown_SkColorType == info.colorType())
52 return false; 52 return false;
53 53
54 if (info != m_info || m_rowBytes != dst->rowBytes()) 54 if (info != m_info || m_rowBytes != dst->rowBytes())
55 return false; 55 return false;
56 56
57 if (!dst->installPixels(m_info, m_pixels, m_rowBytes)) 57 if (!dst->installPixels(m_info, m_pixels, m_rowBytes))
58 return false; 58 return false;
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 // Setting a dummy ImagePlanes object signals to the decoder that we want to do YUV decoding. 357 // Setting a dummy ImagePlanes object signals to the decoder that we want to do YUV decoding.
358 decoder->setData(data, allDataReceived); 358 decoder->setData(data, allDataReceived);
359 OwnPtr<ImagePlanes> dummyImagePlanes = adoptPtr(new ImagePlanes); 359 OwnPtr<ImagePlanes> dummyImagePlanes = adoptPtr(new ImagePlanes);
360 decoder->setImagePlanes(dummyImagePlanes.release()); 360 decoder->setImagePlanes(dummyImagePlanes.release());
361 361
362 return updateYUVComponentSizes(decoder.get(), componentSizes, ImageDecoder:: SizeForMemoryAllocation); 362 return updateYUVComponentSizes(decoder.get(), componentSizes, ImageDecoder:: SizeForMemoryAllocation);
363 } 363 }
364 364
365 } // namespace blink 365 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/ImageDecodingStore.h ('k') | Source/platform/graphics/ImageFrameGeneratorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698