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

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

Issue 1609343004: Add display list fallback reason histograms for 2D canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl web Created 4 years, 10 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) 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ~Canvas2DImageBufferSurface() override 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 willOverwriteCanvas() override { m_layerBridge->willOverwriteCanvas(); } 59 void willOverwriteCanvas() override { m_layerBridge->willOverwriteCanvas(); }
60 SkCanvas* canvas() override { return m_layerBridge->canvas(); } 60 SkCanvas* canvas() override { return m_layerBridge->canvas(); }
61 void disableDeferral() override { m_layerBridge->disableDeferral(); } 61 void disableDeferral(DisableDeferralReason reason) override { m_layerBridge- >disableDeferral(reason); }
62 bool isValid() const override { return m_layerBridge && m_layerBridge->check SurfaceValid(); } 62 bool isValid() const override { return m_layerBridge && m_layerBridge->check SurfaceValid(); }
63 bool restore() override { return m_layerBridge->restoreSurface(); } 63 bool restore() override { return m_layerBridge->restoreSurface(); }
64 WebLayer* layer() const override { return m_layerBridge->layer(); } 64 WebLayer* layer() const override { return m_layerBridge->layer(); }
65 bool isAccelerated() const override { return m_layerBridge->isAccelerated(); } 65 bool isAccelerated() const override { return m_layerBridge->isAccelerated(); }
66 void setFilterQuality(SkFilterQuality filterQuality) override { m_layerBridg e->setFilterQuality(filterQuality); } 66 void setFilterQuality(SkFilterQuality filterQuality) override { m_layerBridg e->setFilterQuality(filterQuality); }
67 void setIsHidden(bool hidden) override { m_layerBridge->setIsHidden(hidden); } 67 void setIsHidden(bool hidden) override { m_layerBridge->setIsHidden(hidden); }
68 void setImageBuffer(ImageBuffer* imageBuffer) override { m_layerBridge->setI mageBuffer(imageBuffer); } 68 void setImageBuffer(ImageBuffer* imageBuffer) override { m_layerBridge->setI mageBuffer(imageBuffer); }
69 void didDraw(const FloatRect& rect) override { m_layerBridge->didDraw(rect); } 69 void didDraw(const FloatRect& rect) override { m_layerBridge->didDraw(rect); }
70 void flush() override { m_layerBridge->flush(); } 70 void flush(FlushReason) override { m_layerBridge->flush(); }
71 void flushGpu() override { m_layerBridge->flushGpu(); } 71 void flushGpu(FlushReason) override { m_layerBridge->flushGpu(); }
72 void prepareSurfaceForPaintingIfNeeded() override { m_layerBridge->prepareSu rfaceForPaintingIfNeeded(); } 72 void prepareSurfaceForPaintingIfNeeded() override { m_layerBridge->prepareSu rfaceForPaintingIfNeeded(); }
73 bool writePixels(const SkImageInfo& origInfo, const void* pixels, size_t row Bytes, int x, int y) override { return m_layerBridge->writePixels(origInfo, pixe ls, rowBytes, x, y); } 73 bool writePixels(const SkImageInfo& origInfo, const void* pixels, size_t row Bytes, int x, int y) override { return m_layerBridge->writePixels(origInfo, pixe ls, rowBytes, x, y); }
74 74
75 PassRefPtr<SkImage> newImageSnapshot(AccelerationHint hint) override { retur n m_layerBridge->newImageSnapshot(hint); } 75 PassRefPtr<SkImage> newImageSnapshot(AccelerationHint hint, SnapshotReason r eason) override { return m_layerBridge->newImageSnapshot(hint, reason); }
76 private: 76 private:
77 RefPtr<Canvas2DLayerBridge> m_layerBridge; 77 RefPtr<Canvas2DLayerBridge> m_layerBridge;
78 }; 78 };
79 79
80 } // namespace blink 80 } // namespace blink
81 81
82 #endif 82 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698