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

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

Issue 5741001: Even more virtual method deinlining. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (windows) Created 10 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 | Annotate | Revision Log
« no previous file with comments | « skia/ext/vector_platform_device_linux.h ('k') | webkit/appcache/appcache_url_request_job.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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/vector_platform_device.h" 5 #include "skia/ext/vector_platform_device.h"
6 6
7 #include <cairo.h> 7 #include <cairo.h>
8 #include <cairo-ft.h> 8 #include <cairo-ft.h>
9 9
10 #include <ft2build.h> 10 #include <ft2build.h>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 cairo_reference(context_); 115 cairo_reference(context_);
116 116
117 transform_.reset(); 117 transform_.reset();
118 } 118 }
119 119
120 VectorPlatformDevice::~VectorPlatformDevice() { 120 VectorPlatformDevice::~VectorPlatformDevice() {
121 // Un-ref |context_| since we referenced it in the constructor. 121 // Un-ref |context_| since we referenced it in the constructor.
122 cairo_destroy(context_); 122 cairo_destroy(context_);
123 } 123 }
124 124
125 SkDeviceFactory* VectorPlatformDevice::getDeviceFactory() {
126 return SkNEW(VectorPlatformDeviceFactory);
127 }
128
129 bool VectorPlatformDevice::IsVectorial() {
130 return true;
131 }
132
133 PlatformDevice::PlatformSurface VectorPlatformDevice::beginPlatformPaint() {
134 return context_;
135 }
136
125 void VectorPlatformDevice::drawBitmap(const SkDraw& draw, 137 void VectorPlatformDevice::drawBitmap(const SkDraw& draw,
126 const SkBitmap& bitmap, 138 const SkBitmap& bitmap,
127 const SkMatrix& matrix, 139 const SkMatrix& matrix,
128 const SkPaint& paint) { 140 const SkPaint& paint) {
129 SkASSERT(bitmap.getConfig() == SkBitmap::kARGB_8888_Config); 141 SkASSERT(bitmap.getConfig() == SkBitmap::kARGB_8888_Config);
130 142
131 // Load the temporary matrix. This is what will translate, rotate and resize 143 // Load the temporary matrix. This is what will translate, rotate and resize
132 // the bitmap. 144 // the bitmap.
133 SkMatrix actual_transform(transform_); 145 SkMatrix actual_transform(transform_);
134 actual_transform.preConcat(matrix); 146 actual_transform.preConcat(matrix);
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 DCHECK(it->second.font_stream); 689 DCHECK(it->second.font_stream);
678 690
679 cairo_font_face_destroy(it->second.cairo_face); 691 cairo_font_face_destroy(it->second.cairo_face);
680 // |it->second.ft_face| is handled by Cairo. 692 // |it->second.ft_face| is handled by Cairo.
681 it->second.font_stream->unref(); 693 it->second.font_stream->unref();
682 } 694 }
683 g_font_cache->clear(); 695 g_font_cache->clear();
684 } 696 }
685 697
686 } // namespace skia 698 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/vector_platform_device_linux.h ('k') | webkit/appcache/appcache_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698