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

Side by Side Diff: skia/ext/bitmap_platform_device_cairo.cc

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years 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
« no previous file with comments | « skia/ext/bitmap_platform_device_cairo.h ('k') | skia/ext/bitmap_platform_device_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "skia/ext/bitmap_platform_device_cairo.h" 5 #include "skia/ext/bitmap_platform_device_cairo.h"
6 #include "skia/ext/platform_canvas.h" 6 #include "skia/ext/platform_canvas.h"
7 7
8 #if defined(OS_OPENBSD) 8 #if defined(OS_OPENBSD)
9 #include <cairo.h> 9 #include <cairo.h>
10 #else 10 #else
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 LoadConfig(); 178 LoadConfig();
179 cairo_surface_t* surface = cairo_get_target(cairo_); 179 cairo_surface_t* surface = cairo_get_target(cairo_);
180 // Tell cairo to flush anything it has pending. 180 // Tell cairo to flush anything it has pending.
181 cairo_surface_flush(surface); 181 cairo_surface_flush(surface);
182 // Tell Cairo that we (probably) modified (actually, will modify) its pixel 182 // Tell Cairo that we (probably) modified (actually, will modify) its pixel
183 // buffer directly. 183 // buffer directly.
184 cairo_surface_mark_dirty(surface); 184 cairo_surface_mark_dirty(surface);
185 return cairo_; 185 return cairo_;
186 } 186 }
187 187
188 void BitmapPlatformDevice::DrawToNativeContext(
189 PlatformSurface surface, int x, int y, const PlatformRect* src_rect) {
190 // Should never be called on Linux.
191 SkASSERT(false);
192 }
193
194 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform, 188 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
195 const SkRegion& region, 189 const SkRegion& region,
196 const SkClipStack&) { 190 const SkClipStack&) {
197 SetMatrixClip(transform, region); 191 SetMatrixClip(transform, region);
198 } 192 }
199 193
200 // PlatformCanvas impl 194 // PlatformCanvas impl
201 195
202 SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque, 196 SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque,
203 uint8_t* data, OnFailureType failureType) { 197 uint8_t* data, OnFailureType failureType) {
(...skipping 18 matching lines...) Expand all
222 width, 216 width,
223 height); 217 height);
224 if (cairo_surface_status(surf) != CAIRO_STATUS_SUCCESS) { 218 if (cairo_surface_status(surf) != CAIRO_STATUS_SUCCESS) {
225 cairo_surface_destroy(surf); 219 cairo_surface_destroy(surf);
226 return false; 220 return false;
227 } 221 }
228 return InstallCairoSurfacePixels(&bitmap_, surf, is_opaque); 222 return InstallCairoSurfacePixels(&bitmap_, surf, is_opaque);
229 } 223 }
230 224
231 } // namespace skia 225 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_cairo.h ('k') | skia/ext/bitmap_platform_device_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698