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

Side by Side Diff: Source/platform/graphics/Canvas2DImageBufferSurface.h

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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 30 matching lines...) Expand all
41 public: 41 public:
42 Canvas2DImageBufferSurface(const IntSize& size, OpacityMode opacityMode = No nOpaque, int msaaSampleCount = 1) 42 Canvas2DImageBufferSurface(const IntSize& size, OpacityMode opacityMode = No nOpaque, int msaaSampleCount = 1)
43 : ImageBufferSurface(size, opacityMode) 43 : ImageBufferSurface(size, opacityMode)
44 , m_layerBridge(Canvas2DLayerBridge::create(size, opacityMode, msaaSampl eCount)) 44 , m_layerBridge(Canvas2DLayerBridge::create(size, opacityMode, msaaSampl eCount))
45 { 45 {
46 clear(); 46 clear();
47 if (isValid()) 47 if (isValid())
48 m_layerBridge->flush(); 48 m_layerBridge->flush();
49 } 49 }
50 50
51 virtual ~Canvas2DImageBufferSurface() 51 ~Canvas2DImageBufferSurface() override
52 { 52 {
53 if (m_layerBridge) 53 if (m_layerBridge)
54 m_layerBridge->beginDestruction(); 54 m_layerBridge->beginDestruction();
55 } 55 }
56 56
57 // ImageBufferSurface implementation 57 // ImageBufferSurface implementation
58 void finalizeFrame(const FloatRect &dirtyRect) override { m_layerBridge->fin alizeFrame(dirtyRect); } 58 void finalizeFrame(const FloatRect &dirtyRect) override { m_layerBridge->fin alizeFrame(dirtyRect); }
59 void willAccessPixels() override { m_layerBridge->willAccessPixels(); } 59 void willAccessPixels() override { m_layerBridge->willAccessPixels(); }
60 SkCanvas* canvas() const override { return m_layerBridge->canvas(); } 60 SkCanvas* canvas() const override { return m_layerBridge->canvas(); }
61 bool isValid() const override { return m_layerBridge && m_layerBridge->check SurfaceValid(); } 61 bool isValid() const override { return m_layerBridge && m_layerBridge->check SurfaceValid(); }
62 bool restore() override { return m_layerBridge->restoreSurface(); } 62 bool restore() override { return m_layerBridge->restoreSurface(); }
63 WebLayer* layer() const override { return m_layerBridge->layer(); } 63 WebLayer* layer() const override { return m_layerBridge->layer(); }
64 bool isAccelerated() const override { return m_layerBridge->isAccelerated(); } 64 bool isAccelerated() const override { return m_layerBridge->isAccelerated(); }
65 void setFilterQuality(SkFilterQuality filterQuality) override { m_layerBridg e->setFilterQuality(filterQuality); } 65 void setFilterQuality(SkFilterQuality filterQuality) override { m_layerBridg e->setFilterQuality(filterQuality); }
66 void setIsHidden(bool hidden) override { m_layerBridge->setIsHidden(hidden); } 66 void setIsHidden(bool hidden) override { m_layerBridge->setIsHidden(hidden); }
67 void setImageBuffer(ImageBuffer* imageBuffer) override { m_layerBridge->setI mageBuffer(imageBuffer); } 67 void setImageBuffer(ImageBuffer* imageBuffer) override { m_layerBridge->setI mageBuffer(imageBuffer); }
68 void didDraw(const FloatRect& rect) override { m_layerBridge->didDraw(); } 68 void didDraw(const FloatRect& rect) override { m_layerBridge->didDraw(); }
69 69
70 PassRefPtr<SkImage> newImageSnapshot() const override { return m_layerBridge ->newImageSnapshot(); } 70 PassRefPtr<SkImage> newImageSnapshot() const override { return m_layerBridge ->newImageSnapshot(); }
71 private: 71 private:
72 RefPtr<Canvas2DLayerBridge> m_layerBridge; 72 RefPtr<Canvas2DLayerBridge> m_layerBridge;
73 }; 73 };
74 74
75 } // namespace blink 75 } // namespace blink
76 76
77 #endif 77 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/BitmapPatternBase.h ('k') | Source/platform/graphics/Canvas2DLayerBridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698