Lines Matching full:hr
118 HRESULT hr = S_OK; in decodeStream() local
122 if (SUCCEEDED(hr)) { in decodeStream()
123 hr = CoCreateInstance( in decodeStream()
133 if (SUCCEEDED(hr)) { in decodeStream()
134 hr = SkIStream::CreateFromSkStream(stream, false, &piStream); in decodeStream()
138 if (SUCCEEDED(hr)) { in decodeStream()
140 hr = piStream->Seek(liBeginning, STREAM_SEEK_SET, nullptr); in decodeStream()
145 if (SUCCEEDED(hr)) { in decodeStream()
146 hr = piImagingFactory->CreateDecoderFromStream( in decodeStream()
157 if (SUCCEEDED(hr)) { in decodeStream()
159 hr = piBitmapDecoder->GetContainerFormat(&guidFormat); in decodeStream()
160 if (SUCCEEDED(hr)) { in decodeStream()
170 if (SUCCEEDED(hr)) { in decodeStream()
171 hr = piBitmapDecoder->GetFrame(0, &piBitmapFrameDecode); in decodeStream()
176 if (SUCCEEDED(hr)) { in decodeStream()
177 hr = piBitmapFrameDecode->QueryInterface( in decodeStream()
185 if (SUCCEEDED(hr)) { in decodeStream()
186 hr = piBitmapSourceOriginal->GetSize(&width, &height); in decodeStream()
190 if (SUCCEEDED(hr)) { in decodeStream()
202 if (SUCCEEDED(hr)) { in decodeStream()
203 hr = piImagingFactory->CreateFormatConverter(&piFormatConverter); in decodeStream()
213 if (SUCCEEDED(hr)) { in decodeStream()
214 hr = piFormatConverter->Initialize( in decodeStream()
226 if (SUCCEEDED(hr)) { in decodeStream()
227 hr = piFormatConverter->QueryInterface( in decodeStream()
233 if (SUCCEEDED(hr)) { in decodeStream()
237 hr = piBitmapSourceConverted->CopyPixels( in decodeStream()
250 return SUCCEEDED(hr); in decodeStream()
343 HRESULT hr = S_OK; in onEncode() local
347 if (SUCCEEDED(hr)) { in onEncode()
348 hr = CoCreateInstance( in onEncode()
358 if (SUCCEEDED(hr)) { in onEncode()
359 hr = SkWIStream::CreateFromSkWStream(stream, &piStream); in onEncode()
364 if (SUCCEEDED(hr)) { in onEncode()
365 hr = piImagingFactory->CreateEncoder(type, nullptr, &piEncoder); in onEncode()
368 if (SUCCEEDED(hr)) { in onEncode()
369 hr = piEncoder->Initialize(piStream.get(), WICBitmapEncoderNoCache); in onEncode()
375 if (SUCCEEDED(hr)) { in onEncode()
376 hr = piEncoder->CreateNewFrame(&piBitmapFrameEncode, &piPropertybag); in onEncode()
379 if (SUCCEEDED(hr)) { in onEncode()
393 // write and set hr iff property exists. in onEncode()
396 if (SUCCEEDED(hr)) { in onEncode()
397 hr = piBitmapFrameEncode->Initialize(piPropertybag.get()); in onEncode()
403 if (SUCCEEDED(hr)) { in onEncode()
404 hr = piBitmapFrameEncode->SetSize(width, height); in onEncode()
410 if (SUCCEEDED(hr)) { in onEncode()
411 hr = piBitmapFrameEncode->SetPixelFormat(&formatGUID); in onEncode()
413 if (SUCCEEDED(hr)) { in onEncode()
415 hr = IsEqualGUID(formatGUID, formatDesired) ? S_OK : E_FAIL; in onEncode()
419 if (SUCCEEDED(hr)) { in onEncode()
422 hr = piBitmapFrameEncode->WritePixels( in onEncode()
429 if (SUCCEEDED(hr)) { in onEncode()
430 hr = piBitmapFrameEncode->Commit(); in onEncode()
433 if (SUCCEEDED(hr)) { in onEncode()
434 hr = piEncoder->Commit(); in onEncode()
437 return SUCCEEDED(hr); in onEncode()