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

Side by Side Diff: third_party/WebKit/Source/core/frame/ImageBitmap.h

Issue 2849463005: Refactor ImageBuffer to make OffscreenCanvas match HTMLCanvasElement (Closed)
Patch Set: x Created 3 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef ImageBitmap_h 5 #ifndef ImageBitmap_h
6 #define ImageBitmap_h 6 #define ImageBitmap_h
7 7
8 #include <memory> 8 #include <memory>
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool IsPremultiplied() const { return image_->IsPremultiplied(); } 110 bool IsPremultiplied() const { return image_->IsPremultiplied(); }
111 PassRefPtr<StaticBitmapImage> Transfer(); 111 PassRefPtr<StaticBitmapImage> Transfer();
112 void close(); 112 void close();
113 113
114 ~ImageBitmap() override; 114 ~ImageBitmap() override;
115 115
116 // CanvasImageSource implementation 116 // CanvasImageSource implementation
117 PassRefPtr<Image> GetSourceImageForCanvas(SourceImageStatus*, 117 PassRefPtr<Image> GetSourceImageForCanvas(SourceImageStatus*,
118 AccelerationHint, 118 AccelerationHint,
119 SnapshotReason, 119 SnapshotReason,
120 const FloatSize&) const override; 120 const FloatSize&) override;
121 bool WouldTaintOrigin(SecurityOrigin*) const override { 121 bool WouldTaintOrigin(SecurityOrigin*) const override {
122 return !image_->OriginClean(); 122 return !image_->OriginClean();
123 } 123 }
124 void AdjustDrawRects(FloatRect* src_rect, FloatRect* dst_rect) const override; 124 void AdjustDrawRects(FloatRect* src_rect, FloatRect* dst_rect) const override;
125 FloatSize ElementSize(const FloatSize&) const override; 125 FloatSize ElementSize(const FloatSize&) const override;
126 bool IsImageBitmap() const override { return true; } 126 bool IsImageBitmap() const override { return true; }
127 int SourceWidth() override { return image_ ? image_->width() : 0; } 127 int SourceWidth() override { return image_ ? image_->width() : 0; }
128 int SourceHeight() override { return image_ ? image_->height() : 0; } 128 int SourceHeight() override { return image_ ? image_->height() : 0; }
129 bool IsAccelerated() const override; 129 bool IsAccelerated() const override;
130 130
(...skipping 30 matching lines...) Expand all
161 bool is_image_bitmap_premultiplied, 161 bool is_image_bitmap_premultiplied,
162 bool is_image_bitmap_origin_clean); 162 bool is_image_bitmap_origin_clean);
163 163
164 RefPtr<StaticBitmapImage> image_; 164 RefPtr<StaticBitmapImage> image_;
165 bool is_neutered_ = false; 165 bool is_neutered_ = false;
166 }; 166 };
167 167
168 } // namespace blink 168 } // namespace blink
169 169
170 #endif // ImageBitmap_h 170 #endif // ImageBitmap_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698