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/AcceleratedImageBufferSurface.h

Issue 2822263004: Remove PaintCanvas::writePixels (Closed)
Patch Set: rm-writepixels: rmdcheck Created 3 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 /* 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 AcceleratedImageBufferSurface(const IntSize&, 49 AcceleratedImageBufferSurface(const IntSize&,
50 OpacityMode = kNonOpaque, 50 OpacityMode = kNonOpaque,
51 const CanvasColorParams& = CanvasColorParams()); 51 const CanvasColorParams& = CanvasColorParams());
52 ~AcceleratedImageBufferSurface() override {} 52 ~AcceleratedImageBufferSurface() override {}
53 53
54 PaintCanvas* Canvas() override { return canvas_.get(); } 54 PaintCanvas* Canvas() override { return canvas_.get(); }
55 bool IsValid() const override; 55 bool IsValid() const override;
56 bool IsAccelerated() const override { return true; } 56 bool IsAccelerated() const override { return true; }
57 sk_sp<SkImage> NewImageSnapshot(AccelerationHint, SnapshotReason) override; 57 sk_sp<SkImage> NewImageSnapshot(AccelerationHint, SnapshotReason) override;
58 GLuint GetBackingTextureHandleForOverwrite() override; 58 GLuint GetBackingTextureHandleForOverwrite() override;
59 bool WritePixels(const SkImageInfo& orig_info,
60 const void* pixels,
61 size_t row_bytes,
62 int x,
63 int y) override;
59 64
60 private: 65 private:
61 unsigned context_id_; 66 unsigned context_id_;
62 sk_sp<SkSurface> surface_; // Uses m_contextProvider. 67 sk_sp<SkSurface> surface_; // Uses m_contextProvider.
63 std::unique_ptr<PaintCanvas> canvas_; 68 std::unique_ptr<PaintCanvas> canvas_;
64 }; 69 };
65 70
66 } // namespace blink 71 } // namespace blink
67 72
68 #endif 73 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698