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

Side by Side Diff: core/fxge/apple/fx_apple_platform.cpp

Issue 2045083003: Remove implicit CFX_CountedRef::operator T*() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix mac build. Created 4 years, 6 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 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxcrt/include/fx_system.h" 7 #include "core/fxcrt/include/fx_system.h"
8 #include "core/fxge/include/fx_ge.h" 8 #include "core/fxge/include/fx_ge.h"
9 9
10 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 10 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 return FALSE; 131 return FALSE;
132 132
133 CGContextSaveGState(ctx); 133 CGContextSaveGState(ctx);
134 CGContextSetTextDrawingMode(ctx, kCGTextFillClip); 134 CGContextSetTextDrawingMode(ctx, kCGTextFillClip);
135 CGRect rect_cg; 135 CGRect rect_cg;
136 CGImageRef pImageCG = nullptr; 136 CGImageRef pImageCG = nullptr;
137 if (m_pClipRgn) { 137 if (m_pClipRgn) {
138 rect_cg = 138 rect_cg =
139 CGRectMake(m_pClipRgn->GetBox().left, m_pClipRgn->GetBox().top, 139 CGRectMake(m_pClipRgn->GetBox().left, m_pClipRgn->GetBox().top,
140 m_pClipRgn->GetBox().Width(), m_pClipRgn->GetBox().Height()); 140 m_pClipRgn->GetBox().Width(), m_pClipRgn->GetBox().Height());
141 const CFX_DIBitmap* pClipMask = m_pClipRgn->GetMask(); 141 const CFX_DIBitmap* pClipMask = m_pClipRgn->GetMask().GetObject();
142 if (pClipMask) { 142 if (pClipMask) {
143 CGDataProviderRef pClipMaskDataProvider = CGDataProviderCreateWithData( 143 CGDataProviderRef pClipMaskDataProvider = CGDataProviderCreateWithData(
144 nullptr, pClipMask->GetBuffer(), 144 nullptr, pClipMask->GetBuffer(),
145 pClipMask->GetPitch() * pClipMask->GetHeight(), _DoNothing); 145 pClipMask->GetPitch() * pClipMask->GetHeight(), _DoNothing);
146 CGFloat decode_f[2] = {255.f, 0.f}; 146 CGFloat decode_f[2] = {255.f, 0.f};
147 pImageCG = CGImageMaskCreate( 147 pImageCG = CGImageMaskCreate(
148 pClipMask->GetWidth(), pClipMask->GetHeight(), 8, 8, 148 pClipMask->GetWidth(), pClipMask->GetHeight(), 8, 8,
149 pClipMask->GetPitch(), pClipMaskDataProvider, decode_f, FALSE); 149 pClipMask->GetPitch(), pClipMaskDataProvider, decode_f, FALSE);
150 CGDataProviderRelease(pClipMaskDataProvider); 150 CGDataProviderRelease(pClipMaskDataProvider);
151 } 151 }
(...skipping 19 matching lines...) Expand all
171 if (m_pPlatformFont) { 171 if (m_pPlatformFont) {
172 CQuartz2D& quartz2d = 172 CQuartz2D& quartz2d =
173 static_cast<CApplePlatform*>(CFX_GEModule::Get()->GetPlatformData()) 173 static_cast<CApplePlatform*>(CFX_GEModule::Get()->GetPlatformData())
174 ->m_quartz2d; 174 ->m_quartz2d;
175 quartz2d.DestroyFont(m_pPlatformFont); 175 quartz2d.DestroyFont(m_pPlatformFont);
176 m_pPlatformFont = nullptr; 176 m_pPlatformFont = nullptr;
177 } 177 }
178 } 178 }
179 179
180 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 180 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698